diff --git a/src/Project.zig b/src/Project.zig index 2f3a517..0869a69 100644 --- a/src/Project.zig +++ b/src/Project.zig @@ -808,11 +808,6 @@ pub fn file_modified(self: *Self, file_path: []const u8) void { } pub fn file_renamed(self: *Self, from_path: []const u8, to_path: []const u8) OutOfMemoryError!void { - for (self.files.items) |*file| { - if (!std.mem.eql(u8, file.path, to_path)) continue; - self.file_deleted(from_path); - return; - } for (self.files.items) |*file| { if (!std.mem.eql(u8, file.path, from_path)) continue; const new_path = try self.allocator.dupe(u8, to_path); diff --git a/src/file_watcher.zig b/src/file_watcher.zig index 0ef9e52..b258f29 100644 --- a/src/file_watcher.zig +++ b/src/file_watcher.zig @@ -132,10 +132,7 @@ const INotifyBackend = struct { } } - fn handle_read_ready(self: *@This(), allocator: std.mem.Allocator, parent: tp.pid_ref) (std.posix.ReadError || error{ ThespianFileDescriptorWaitReadFailed, NoSpaceLeft, OutOfMemory, Exit })!void { - // re-arm the file_discriptor - try self.fd_watcher.wait_read(); - + fn handle_read_ready(self: *@This(), allocator: std.mem.Allocator, parent: tp.pid_ref) (std.posix.ReadError || error{ NoSpaceLeft, OutOfMemory, Exit })!void { const InotifyEvent = extern struct { wd: i32, mask: u32,