Sfoglia il codice sorgente

Bug 1994: Do not abort "Keep remote directory up to date" when connection is lost while deleting files or looking for differences and the session is reconnected

https://winscp.net/tracker/1994

Source commit: e6cb396617669f39db658c8dc218cc62f2fc8f6a
Martin Prikryl 4 anni fa
parent
commit
240301bbdb
1 ha cambiato i file con 19 aggiunte e 5 eliminazioni
  1. 19 5
      source/forms/CustomScpExplorer.cpp

+ 19 - 5
source/forms/CustomScpExplorer.cpp

@@ -5599,15 +5599,29 @@ void __fastcall TCustomScpExplorerForm::DoSynchronize(
     }
     catch (Exception & E)
     {
-      if (FLAGSET(Params.Options, soContinueOnError) && Terminal->Active &&
-          DebugAlwaysTrue(FOnFeedSynchronizeError != NULL))
+      if (!Terminal->Active)
       {
-        // noop, already logged in MoreMessageDialog
+        ShowExtendedExceptionEx(Terminal, &E);
+        // Do not abort the "keep up to date" when the session was succesfully reconnected.
+        if (!Terminal->Active)
+        {
+          throw;
+        }
       }
       else
       {
-        ShowExtendedExceptionEx(Terminal, &E);
-        throw;
+        if (FLAGSET(Params.Options, soContinueOnError) &&
+            DebugAlwaysTrue(FOnFeedSynchronizeError != NULL))
+        {
+          // noop, already logged in MoreMessageDialog
+        }
+        else
+        {
+          // We get mostly EAbort here, so this is noop.
+          // Exception is an error when listing directories while looking for differences.
+          ShowExtendedExceptionEx(Terminal, &E);
+          throw;
+        }
       }
     }
   }