1
0
Эх сурвалжийг харах

Bug 1417: When user profile is stored on UNC path and the first drive is hidden, local panel starts empty

https://winscp.net/tracker/1417

Source commit: 6e999077c992e78a21463d35dd2eba185d1f82c4
Martin Prikryl 9 жил өмнө
parent
commit
bb40bcd1ab

+ 4 - 2
source/packages/filemng/BaseUtils.pas

@@ -75,14 +75,16 @@ var
   Drive: TDrive;
 begin
   for Drive := 'C' to 'Z' do
-    if (DriveInfo[Drive].DriveType = DRIVE_FIXED) and
+    if DriveInfo[Drive].Valid and
+       (DriveInfo[Drive].DriveType = DRIVE_FIXED) and
        DirectoryExists(ApiPath(Drive + ':\')) then
     begin
       Result := Drive + ':\';
       Exit;
     end;
   for Drive := 'C' to 'Z' do
-    if (DriveInfo[Drive].DriveType = DRIVE_REMOTE) and
+    if DriveInfo[Drive].Valid and
+       (DriveInfo[Drive].DriveType = DRIVE_REMOTE) and
        DirectoryExists(ApiPath(Drive + ':\')) then
     begin
       Result := Drive + ':\';