| author | |
| committer | |
| log | 2ebf021061b8789226fa8bafe36f7827925d7022 |
| tree | d6b928d9c8a88267d7e5d2a020ae58be14a2af3b |
| parent | 7bccef3e4e4d48c2e1d34ec28754d8c33902f2bb |
Otherwise it reports EBADF.2 files changed, 6 insertions(+), 2 deletions(-)
lib/compiler/build_runner.zig+2-2| ... | ... | @@ -419,7 +419,7 @@ pub fn main() !void { |
| 419 | 419 | std.posix.fanotify_mark(w.fan_fd, .{ |
| 420 | 420 | .ADD = true, |
| 421 | 421 | .ONLYDIR = true, |
| 422 | }, Watch.fan_mask, path.root_dir.handle.fd, path.subPathOpt()) catch |err| { | |
| 422 | }, Watch.fan_mask, path.root_dir.handle.fd, path.subPathOrDot()) catch |err| { | |
| 423 | 423 | fatal("unable to watch {}: {s}", .{ path, @errorName(err) }); |
| 424 | 424 | }; |
| 425 | 425 | |
| ... | ... | @@ -471,7 +471,7 @@ pub fn main() !void { |
| 471 | 471 | try std.posix.fanotify_mark(w.fan_fd, .{ |
| 472 | 472 | .REMOVE = true, |
| 473 | 473 | .ONLYDIR = true, |
| 474 | }, Watch.fan_mask, path.root_dir.handle.fd, path.subPathOpt()); | |
| 474 | }, Watch.fan_mask, path.root_dir.handle.fd, path.subPathOrDot()); | |
| 475 | 475 | |
| 476 | 476 | w.dir_table.swapRemoveAt(i); |
| 477 | 477 | w.handle_table.swapRemoveAt(i); |
lib/std/Build/Cache/Path.zig+4| ... | ... | @@ -173,6 +173,10 @@ pub fn subPathOpt(self: Path) ?[]const u8 { |
| 173 | 173 | return if (self.sub_path.len == 0) null else self.sub_path; |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | pub fn subPathOrDot(self: Path) []const u8 { | |
| 177 | return if (self.sub_path.len == 0) "." else self.sub_path; | |
| 178 | } | |
| 179 | ||
| 176 | 180 | /// Useful to make `Path` a key in `std.ArrayHashMap`. |
| 177 | 181 | pub const TableAdapter = struct { |
| 178 | 182 | pub const Hash = std.hash.Wyhash; |