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

Source commit: a682ddb9548bf830250f9acf442cf78c3179b792
Martin Prikryl %!s(int64=6) %!d(string=hai) anos
pai
achega
1ae2af5cb2
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      source/forms/ScpCommander.cpp

+ 7 - 0
source/forms/ScpCommander.cpp

@@ -550,6 +550,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)
     {