[X2Go-Commits] [x2goclient] 01/01: Replace "::" with "_" for the desktop link name on Windows.

git-admin at x2go.org git-admin at x2go.org
Fri Oct 23 11:20:29 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 1d9c4ab9c6793f7e203946251e4b1a997f6513ab
Author: Oleksandr Shneyder <o.shneyder at phoca-gmbh.de>
Date:   Fri Oct 23 11:20:18 2015 +0200

    Replace "::" with "_" for the desktop link name on Windows.
---
 debian/changelog        |    1 +
 src/sessionexplorer.cpp |    5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index b89f912..b552f9e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,7 @@ x2goclient (4.0.5.1-0x2go1) UNRELEASED; urgency=low
     - xsettingswidget: compile only on Windows.
     - Add support for new style command line options of xfreerdp on direct RDP
       connections. (Fixes: #772).
+    - Replace "::" with "_" for the desktop link name on Windows.
 
   [ Mike Gabriel ]
   * New upstream release (4.0.5.1):
diff --git a/src/sessionexplorer.cpp b/src/sessionexplorer.cpp
index 02c5f7e..3734934 100644
--- a/src/sessionexplorer.cpp
+++ b/src/sessionexplorer.cpp
@@ -206,6 +206,9 @@ void SessionExplorer::slotCreateDesktopIcon ( SessionButton* bt )
     file.setPermissions(QFile::ReadOwner|QFile::WriteOwner|QFile::ExeOwner);
     file.close();
 #else
+    // Windows can't create links containing "::"
+    QString linkname=name;
+    linkname.replace("::","_");
     QString scrname=QDir::tempPath() +"\\mklnk.vbs";
     QFile file ( scrname );
     if ( !file.open ( QIODevice::WriteOnly | QIODevice::Text ) )
@@ -218,7 +221,7 @@ void SessionExplorer::slotCreateDesktopIcon ( SessionButton* bt )
     QTextStream out ( &file );
     out << "Set Shell = CreateObject(\"WScript.Shell\")\n"<<
         "DesktopPath = Shell.SpecialFolders(\"Desktop\")\n"<<
-        "Set link = Shell.CreateShortcut(DesktopPath & \"\\"<<name<<
+        "Set link = Shell.CreateShortcut(DesktopPath & \"\\"<<linkname<<
         ".lnk\")\n"<<
         "link.Arguments = \""<<args.join (" ")<<"\"\n"<<
         "link.Description = \""<<tr ( "X2Go Link to session " ) <<

--
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