Selaa lähdekoodia

Bug fix: When opening a connection from a command-line which does not have a local directory set yet, local panel is opened empty

Caused by Bug 1740

(cherry picked from commit 1ae2af5cb2a79f790b47de4faa5ec6c8ef5868fe)

Source commit: 69c28d4993dc20423dd1de2e1ad4e1aaeaeed4a3
Martin Prikryl 6 vuotta sitten
vanhempi
sitoutus
e829c80285
1 muutettua tiedostoa jossa 7 lisäystä ja 0 poistoa
  1. 7 0
      source/forms/ScpCommander.cpp

+ 7 - 0
source/forms/ScpCommander.cpp

@@ -506,6 +506,13 @@ void __fastcall TScpCommanderForm::TerminalChanged(bool Replaced)
     }
     FFirstTerminal = false;
 
+    // Happens when opening a connection from a command-line (StartingDisconnected was not called),
+    // which does not have a local directory set yet.
+    if (LocalDirView->Path.IsEmpty())
+    {
+      LocalDefaultDirectory();
+    }
+
     if (WinConfiguration->DefaultDirIsHome &&
         !Terminal->SessionData->UpdateDirectories)
     {