Browse Source

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 6 years ago
parent
commit
1ae2af5cb2
1 changed files with 7 additions and 0 deletions
  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;
     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 &&
     if (WinConfiguration->DefaultDirIsHome &&
         !Terminal->SessionData->UpdateDirectories)
         !Terminal->SessionData->UpdateDirectories)
     {
     {