fix(kqueue): remove watch on old directory after directory rename
This commit is contained in:
parent
8be60c0688
commit
95c7580a87
1 changed files with 1 additions and 0 deletions
|
|
@ -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)});
|
std.log.err("nightwatch: handler returned {s}, stopping watch thread", .{@errorName(e)});
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
self.remove_watch(allocator, dir_path);
|
||||||
} else if (ev.fflags & NOTE_WRITE != 0) {
|
} else if (ev.fflags & NOTE_WRITE != 0) {
|
||||||
self.scan_dir(allocator, dir_path) catch |e|
|
self.scan_dir(allocator, dir_path) catch |e|
|
||||||
std.log.err("nightwatch: scan_dir failed: {s}", .{@errorName(e)});
|
std.log.err("nightwatch: scan_dir failed: {s}", .{@errorName(e)});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue