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.
This commit is contained in:
Yorhel 2024-07-14 20:01:17 +02:00
parent 2f97601736
commit c41467f240

View file

@ -234,7 +234,7 @@ const ScanDir = struct {
if (self.entries.count() > 0) { if (self.entries.count() > 0) {
var it = &self.dir.sub; var it = &self.dir.sub;
while (it.*) |e| { while (it.*) |e| {
if (self.entries.contains(e)) { if (self.entries.getKey(e) == e) {
e.delStatsRec(self.dir); e.delStatsRec(self.dir);
it.* = e.next; it.* = e.next;
} else } else