FIX: Long delay with locked network path

This commit is contained in:
Alexander Koblov 2022-04-05 20:28:12 +03:00
commit 7d90b0852f

View file

@ -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