Browse Source

Bug fix: Starting a synchronization in a new window does not work if the remote path consist of one level only

(so it looks like a switch: /path)

(cherry picked from commit f03f071c3d7740af096f0503f7c30c232aa13c93)

Source commit: 94f603714b22354033116b908dba8fd1d3751d87
Martin Prikryl 5 years ago
parent
commit
0e3b4c606b
1 changed files with 8 additions and 8 deletions
  1. 8 8
      source/forms/CustomScpExplorer.cpp

+ 8 - 8
source/forms/CustomScpExplorer.cpp

@@ -5565,11 +5565,11 @@ void __fastcall TCustomScpExplorerForm::SynchronizeInNewWindow(
   UnicodeString SessionName = CreateHiddenDuplicateSession();
 
   UnicodeString AdditionalParams =
-    FORMAT(L"%s \"%s\" \"%s\" %d %d %s%s", (
-      TProgramParams::FormatSwitch(KEEP_UP_TO_DATE_SWITCH),
-      Params.LocalDirectory, Params.RemoteDirectory, Params.Params, Params.Options,
+    FORMAT(L"%s%s %s // \"%s\" \"%s\" %d %d", (
       TProgramParams::FormatSwitch(DEFAULTS_SWITCH),
-      SerializeCopyParamForCommandLine(CopyParams)));
+      SerializeCopyParamForCommandLine(CopyParams),
+      TProgramParams::FormatSwitch(KEEP_UP_TO_DATE_SWITCH),
+      Params.LocalDirectory, Params.RemoteDirectory, Params.Params, Params.Options));
 
   ExecuteNewInstance(SessionName, AdditionalParams);
 }
@@ -5777,11 +5777,11 @@ void __fastcall TCustomScpExplorerForm::FullSynchronizeInNewWindow(
   UnicodeString SessionName = CreateHiddenDuplicateSession();
 
   UnicodeString AdditionalParams =
-    FORMAT(L"%s \"%s\" \"%s\" %d %d %s%s", (
-      TProgramParams::FormatSwitch(SYNCHRONIZE_SWITCH),
-      LocalDirectory, RemoteDirectory, Mode, Params,
+    FORMAT(L"%s%s %s // \"%s\" \"%s\" %d %d", (
       TProgramParams::FormatSwitch(DEFAULTS_SWITCH),
-      SerializeCopyParamForCommandLine(CopyParams)));
+      SerializeCopyParamForCommandLine(CopyParams),
+      TProgramParams::FormatSwitch(SYNCHRONIZE_SWITCH),
+      LocalDirectory, RemoteDirectory, Mode, Params));
 
   ExecuteNewInstance(SessionName, AdditionalParams);
 }