fix(kqueue): remove watch on old directory after directory rename

This commit is contained in:
CJ van den Berg 2026-03-29 13:23:16 +02:00
parent 8be60c0688
commit 95c7580a87
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -172,6 +172,7 @@ fn thread_fn(self: *@This(), allocator: std.mem.Allocator) void {
std.log.err("nightwatch: handler returned {s}, stopping watch thread", .{@errorName(e)});
return;
};
self.remove_watch(allocator, dir_path);
} else if (ev.fflags & NOTE_WRITE != 0) {
self.scan_dir(allocator, dir_path) catch |e|
std.log.err("nightwatch: scan_dir failed: {s}", .{@errorName(e)});