summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2024-07-14 20:01:17 +0200
committerYorhel <git@yorhel.nl>2024-07-14 20:01:19 +0200
commitc41467f2400c9416db49dc699be368e33e68ffa7 (patch)
tree0c4f92ebdf8e228b049b34c1092ca26bbc5ff91f
parent2f97601736985a62898eb0b54cc485926c283879 (diff)
Fix entries getting removed when their type changes on refreshHEADzig
Somewhat surprised nobody reported this one yet, it is rather weird and obviously buggy behavior. A second refresh would fix it again, but still.
-rw-r--r--src/scan.zig2
1 files changed, 1 insertions, 1 deletions
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