Explorar o código

Bug 1761: Local recycle bin is unintentionally scanned, slowing down browsing

https://winscp.net/tracker/1761

Source commit: 6d7c0767c3f832ac367bac544b7389810212a6d0
Martin Prikryl %!s(int64=6) %!d(string=hai) anos
pai
achega
fae87c3dc7
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      source/packages/filemng/DriveView.pas

+ 3 - 2
source/packages/filemng/DriveView.pas

@@ -1447,8 +1447,9 @@ begin
   NodeData.FIsRecycleBin :=
     (SRec.Attr and faSysFile <> 0) and
     (ParentNode.Level = 0) and
-    ((UpperCase(SRec.Name) = 'RECYCLED') or
-     (UpperCase(SRec.Name) = 'RECYCLER'));
+    (SameText(SRec.Name, 'RECYCLED') or
+     SameText(SRec.Name, 'RECYCLER') or
+     SameText(SRec.Name, '$RECYCLE.BIN'));
 
   { query content attributes ("has subfolder") only if tree view is visible }
   { to avoid unnecessary scan of subfolders (which may take some time) }