[X2Go-Commits] [x2goclient] 01/01: Fix "connection failed" "pscp" error with folder sharing (Fixes: #868)

git-admin at x2go.org git-admin at x2go.org
Sun May 10 20:10:04 CEST 2015


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2goclient.

commit 0462b6ce608523ec54930ad7f2c0655f46806a71
Author: Mike DePaulo <mikedep333 at gmail.com>
Date:   Sun May 10 14:09:20 2015 -0400

    Fix "connection failed" "pscp" error with folder sharing (Fixes: #868)
---
 debian/changelog   |    4 ++++
 src/sshprocess.cpp |   14 ++++++++++----
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 20b4a51..b049511 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,10 @@ x2goclient (4.0.4.0-0x2go1) UNRELEASED; urgency=low
   * New upstream release (4.0.4.0):
     - Windows: Do not delete saved PuTTY sessions when Kerberos 5
       (GSSAPI) authentication is enabled (Fixes: #625/#789)
+    - Windows: Fix "Connection failed" "pscp" error with folder
+      sharing when Kerberos 5 (GSSAPI) auth is used, and the
+      server- side home dir is at a path other than /home/$USER
+      (Fixes: #868)
     - Windows: Include debug build in the regular installer.
       It is an optional component during the install. It is not
       installed by default.
diff --git a/src/sshprocess.cpp b/src/sshprocess.cpp
index d3e1911..18b3106 100644
--- a/src/sshprocess.cpp
+++ b/src/sshprocess.cpp
@@ -266,10 +266,16 @@ void SshProcess::start_cp(QString src, QString dst)
     {
         proc=new QProcess(this);
 #ifdef Q_OS_WIN
-//pscp don't working with paths like "~user"
-//I hope a home directories of your users are in /home/
-        dst.replace("~"+masterCon->getUser(),"/home/"+masterCon->getUser());
-        dst.replace("~","/home/"+masterCon->getUser());
+//pscp doesn't acccept paths like "~user/foo.txt" when in SFTP mode (default)
+//However, pscp does accept paths like "~/foo.txt"
+//You simply have to leave the "~/" out.
+//
+//This workaround assumes that files will never be uploaded to a home dir
+//other than the user's.
+        dst.remove("~"+masterCon->getUser()+"/");
+        dst.remove("~"+masterCon->getUser()    );
+        dst.remove("~/");
+        dst.remove("~" );
 
         QString sshString="pscp -batch -P "+
 #else

--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git


More information about the x2go-commits mailing list