From adf172cea6a9cb1d8ca9189cd978d38247e16efe Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Sun, 29 Mar 2026 18:17:39 +0200 Subject: [PATCH] fix(windows): scan dirs moved into watch tree --- src/backend/Windows.zig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/backend/Windows.zig b/src/backend/Windows.zig index d4dacd2..ed0a40b 100644 --- a/src/backend/Windows.zig +++ b/src/backend/Windows.zig @@ -253,6 +253,12 @@ fn thread_fn( } gop.value_ptr.* = ot; } + // A directory that appears via move-in carries existing children + // that will never generate FILE_ACTION_ADDED events. Scan its + // contents into the cache so subsequent deletes resolve their + // type. Scanning a genuinely new (empty) directory is a no-op. + if (ot == .dir and event_type == .created) + scan_path_types_into(allocator, path_types, full_path); break :blk ot; }; // Suppress FILE_ACTION_MODIFIED on directories: these are