fix: log silent errors and fix scan_dir dangling snapshot key

This commit is contained in:
CJ van den Berg 2026-03-15 00:08:07 +01:00
parent 046c304c60
commit eb42d23fc8
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
5 changed files with 43 additions and 14 deletions

View file

@ -198,7 +198,8 @@ fn thread_fn(
// the `info` pointer (which points into w.buf) a dangling reference.
const next_entry_offset = info.NextEntryOffset;
watches_mutex.unlock();
handler.change(full_path, event_type, object_type) catch {
handler.change(full_path, event_type, object_type) catch |e| {
std.log.err("nightwatch: handler returned {s}, stopping watch thread", .{@errorName(e)});
watches_mutex.lock();
break;
};