[X2Go-Commits] [x2goclient] 257/280: src/onmainwindow.cpp: use QFileInfo to get the key file's basename in exportDirs () instead of the old, potentially faulty string replace dance.
git-admin at x2go.org
git-admin at x2go.org
Wed Jan 18 12:26:18 CET 2017
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch bugfix/osx
in repository x2goclient.
commit efb8da200208f53e6e9888a81ba4efe24e37c9f9
Author: Mihai Moldovan <ionic at ionic.de>
Date: Wed Oct 26 22:05:10 2016 +0200
src/onmainwindow.cpp: use QFileInfo to get the key file's basename in exportDirs () instead of the old, potentially faulty string replace dance.
---
debian/changelog | 3 +++
src/onmainwindow.cpp | 11 +++++------
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 89de484..e60504b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -487,6 +487,9 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium
it back.
- src/onmainwindow.cpp: only pass non-Cygwin paths to QFile::exists () in
generateKey (). Refactor a bit to drop the now-unnecessary ret variable.
+ - src/onmainwindow.cpp: use QFileInfo to get the key file's basename in
+ exportDirs () instead of the old, potentially faulty string replace
+ dance.
[ Bernard Cafarelli ]
* New upstream version (4.0.5.3):
diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp
index 21fd521..63983f3 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -7999,12 +7999,11 @@ void ONMainWindow::exportDirs ( QString exports,bool removable )
QString uname=getCurrentUname();
- QString dst=dr.key;
- QString dhdir=homeDir+"/.x2go";
-#ifdef Q_OS_WIN
- dhdir=wapiShortFileName ( dhdir );
-#endif
- dst.replace ( dhdir +"/ssh/gen/","" );
+
+ /* For the destination, fetch the base name only. */
+ QFileInfo tmp_file_info (dr.key);
+ QString dst = tmp_file_info.fileName ();
+
dst="~"+uname +"/.x2go/ssh/"+dst;
dr.dstKey=dst;
dr.isRemovable=removable;
--
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