Browse Source

Bug fix: Whole local drive could have been scanned when trying to browse to non-existing or hidden folders

Undoing Bug 956 superseded by Bug 1320

Source commit: bd42a4bb85207a2ed0152b6a8654a0e32269154f
Martin Prikryl 5 years ago
parent
commit
370aaebf48
1 changed files with 1 additions and 14 deletions
  1. 1 14
      source/packages/filemng/DriveView.pas

+ 1 - 14
source/packages/filemng/DriveView.pas

@@ -1613,30 +1613,17 @@ function TDriveView.FindNodeToPath(Path: string): TTreeNode;
   end;
 
   function SearchSubDirs(ParentNode: TTreeNode; Path: string): TTreeNode;
-  var
-    Read: Boolean;
   begin
     Result := nil;
     if Length(Path) > 0 then
     begin
-      Read := False;
-
       if not TNodeData(ParentNode.Data).Scanned then
       begin
         ReadSubDirs(ParentNode, GetDriveTypetoNode(ParentNode));
-        Read := True;
       end;
 
+      // Factored out of DoSearchSubDirs is remnant of Bug 956 superceded by Bug 1320
       Result := DoSearchSubDirs(ParentNode, Path);
-
-      // reread subfolders, just in case the directory we look for was just created
-      // (as can happen when navigating to new remote directory with synchronized
-      // browsing enabled and opting to create the non-existing local directory)
-      if (not Assigned(Result)) and (not Read) then
-      begin
-        ValidateDirectoryEx(ParentNode, rsNoRecursive, True);
-        Result := DoSearchSubDirs(ParentNode, Path);
-      end;
     end;
   end; {SearchSubDirs}