Jelajahi Sumber

FIX: Long delay with locked network path

Alexander Koblov 3 tahun lalu
induk
melakukan
7d90b0852f
1 mengubah file dengan 12 tambahan dan 5 penghapusan
  1. 12 5
      src/fileviews/ufileview.pas

+ 12 - 5
src/fileviews/ufileview.pas

@@ -2620,13 +2620,20 @@ begin
     if Assigned(APage) and (APage.LockState <> tlsNormal) then
     begin
       if not mbCompareFileNames(FHistory.CurrentPath, APage.LockPath) then
+      begin
+        FileSourceClass:= gVfsModuleList.GetFileSource(APage.LockPath);
+        if Assigned(FileSourceClass) then aFileSource := FileSourceClass.Create;
         FHistory.Add(aFileSource, APage.LockPath);
+      end;
+    end;
+    if TFileSystemFileSource.ClassNameIs(aFileSource.ClassName) then
+    begin
+      // Go to upper directory if current doesn't exist
+      sPath := GetDeepestExistingPath(FHistory.CurrentPath);
+      if Length(sPath) = 0 then sPath := mbGetCurrentDir;
+      if not mbCompareFileNames(sPath, FHistory.CurrentPath) then
+        FHistory.Add(aFileSource, sPath);
     end;
-    // Go to upper directory if current doesn't exist
-    sPath := GetDeepestExistingPath(FHistory.CurrentPath);
-    if Length(sPath) = 0 then sPath := mbGetCurrentDir;
-    if not mbCompareFileNames(sPath, FHistory.CurrentPath) then
-      FHistory.Add(aFileSource, sPath);
   end;
 
   if Assigned(aFileSource) then