Browse Source

Bug 1809: Do not default to Documents folder on network drive

https://winscp.net/tracker/1809

Source commit: 4e5c4dc7f89f5ee19ab1dd72c04c483fa08f52da
Martin Prikryl 6 years ago
parent
commit
883ddacf92
1 changed files with 8 additions and 1 deletions
  1. 8 1
      source/forms/ScpCommander.cpp

+ 8 - 1
source/forms/ScpCommander.cpp

@@ -599,7 +599,14 @@ void __fastcall TScpCommanderForm::LocalDefaultDirectory()
     try
     {
       LocalDirView->HomeDirectory = L"";
-      LocalDirView->ExecuteHomeDirectory();
+      if (IsUncPath(LocalDirView->HomeDirectory))
+      {
+        LocalDirView->Path = DriveInfo->AnyValidPath();
+      }
+      else
+      {
+        LocalDirView->ExecuteHomeDirectory();
+      }
     }
     catch(Exception & E)
     {