浏览代码

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

https://winscp.net/tracker/1761
(cherry picked from commit fae87c3dc7ba1fbc14acc2e0107fe089f443a933)

Source commit: fd4dee7b322ceda523afdc31160b29ff5d6ac864
Martin Prikryl 6 年之前
父节点
当前提交
b83d2663f9
共有 1 个文件被更改,包括 3 次插入2 次删除
  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) }