mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
Add NotDir as possible error for os.inotify_add_watch
Possible when "mask contains IN_ONLYDIR and pathname is not a directory."
This commit is contained in:
parent
1063bf696e
commit
ba47e09373
@ -3652,6 +3652,7 @@ pub const INotifyAddWatchError = error{
|
||||
FileNotFound,
|
||||
SystemResources,
|
||||
UserResourceLimitReached,
|
||||
NotDir,
|
||||
} || UnexpectedError;
|
||||
|
||||
/// add a watch to an initialized inotify instance
|
||||
@ -3675,6 +3676,7 @@ pub fn inotify_add_watchZ(inotify_fd: i32, pathname: [*:0]const u8, mask: u32) I
|
||||
ENOENT => return error.FileNotFound,
|
||||
ENOMEM => return error.SystemResources,
|
||||
ENOSPC => return error.UserResourceLimitReached,
|
||||
ENOTDIR => return error.NotDir,
|
||||
else => |err| return unexpectedErrno(err),
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user