Explorar o código

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 %!s(int64=6) %!d(string=hai) anos
pai
achega
e829c80285
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  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)
     {