]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Work around a failure in Windows 10 jump lists.
authorSimon Tatham <anakin@pobox.com>
Thu, 6 Aug 2015 18:25:56 +0000 (19:25 +0100)
committerSimon Tatham <anakin@pobox.com>
Sat, 17 Oct 2015 16:30:17 +0000 (17:30 +0100)
We've had several reports that launching saved sessions from the
Windows 10 jump list fails; Changyu Li reports that this is because we
create those IShellLink objects with a command line string starting
with @, and in Windows 10 that causes the SetArguments method to
silently do the wrong thing.

(cherry picked from commit 8bf5c1b31f1a1449d694e3604e293b0831eb2657)

windows/winjump.c

index f674133b43d5f42e959eac215f920ffbed797d5f..eca5041a8dfa949da3e91321d494ffcf354c95c6 100644 (file)
@@ -429,7 +429,11 @@ static IShellLink *make_shell_link(const char *appname,
     ret->lpVtbl->SetPath(ret, app_path);
 
     if (sessionname) {
-        param_string = dupcat("@", sessionname, NULL);
+        /* The leading space is reported to work around a Windows 10
+         * behaviour change in which an argument string starting with
+         * '@' causes the SetArguments method to silently do the wrong
+         * thing. */
+        param_string = dupcat(" @", sessionname, NULL);
     } else {
         param_string = dupstr("");
     }