瀏覽代碼

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 年之前
父節點
當前提交
1ae2af5cb2
共有 1 個文件被更改,包括 7 次插入0 次删除
  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)
     {