Browse Source

Bug 1684: Failure when canceling session reconnect (4th)

https://winscp.net/tracker/1684

Source commit: efc27f1f2e6de5401f2074b8a48e0da713418c5d
Martin Prikryl 7 years ago
parent
commit
f1624975f0
1 changed files with 4 additions and 1 deletions
  1. 4 1
      source/components/UnixDriveView.cpp

+ 4 - 1
source/components/UnixDriveView.cpp

@@ -79,7 +79,10 @@ void __fastcall TCustomUnixDriveView::SetTerminal(TTerminal * value)
     FTerminal = value;
     FTerminal = value;
     Items->Clear();
     Items->Clear();
     #ifndef DESIGN_ONLY
     #ifndef DESIGN_ONLY
-    if (FTerminal != NULL)
+    // If terminal is not active initially, we will never load fixed paths, when it become active.
+    // But actually terminal is not active here, only when we are replacing an abandoned terminal
+    // with a dummy one (which will never become active)
+    if ((FTerminal != NULL) && FTerminal->Active)
     {
     {
       TStrings * FixedPaths = FTerminal->FixedPaths;
       TStrings * FixedPaths = FTerminal->FixedPaths;
       if (FixedPaths != NULL)
       if (FixedPaths != NULL)