From c41467f2400c9416db49dc699be368e33e68ffa7 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Sun, 14 Jul 2024 20:01:17 +0200 Subject: [PATCH] Fix entries getting removed when their type changes on refresh Somewhat surprised nobody reported this one yet, it is rather weird and obviously buggy behavior. A second refresh would fix it again, but still. --- src/scan.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scan.zig b/src/scan.zig index 2a53c78..a7dc91a 100644 --- a/src/scan.zig +++ b/src/scan.zig @@ -234,7 +234,7 @@ const ScanDir = struct { if (self.entries.count() > 0) { var it = &self.dir.sub; while (it.*) |e| { - if (self.entries.contains(e)) { + if (self.entries.getKey(e) == e) { e.delStatsRec(self.dir); it.* = e.next; } else