authorgravatar for squeek502@hotmail.comRyan Liptak <squeek502@hotmail.com> 2021-06-23 17:22:34-07:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2021-07-15 10:51:25+03:00
loga84402d7963c08f72e571da7fd0bea2b57aca411
tree9f2c838e52273a9256c8f8b32315b40444579b92
parent132b18e2b39feca3b90b1b13df2b4649b1661fd5

Add NotDir as possible error for os.inotify_add_watch

Possible when "mask contains IN_ONLYDIR and pathname is not a directory."

1 files changed, 2 insertions(+), 0 deletions(-)

lib/std/os.zig+2
......@@ -3667,6 +3667,7 @@ pub const INotifyAddWatchError = error{
36673667 FileNotFound,
36683668 SystemResources,
36693669 UserResourceLimitReached,
3670 NotDir,
36703671} || UnexpectedError;
36713672
36723673/// add a watch to an initialized inotify instance
......@@ -3690,6 +3691,7 @@ pub fn inotify_add_watchZ(inotify_fd: i32, pathname: [*:0]const u8, mask: u32) I
36903691 ENOENT => return error.FileNotFound,
36913692 ENOMEM => return error.SystemResources,
36923693 ENOSPC => return error.UserResourceLimitReached,
3694 ENOTDIR => return error.NotDir,
36933695 else => |err| return unexpectedErrno(err),
36943696 }
36953697}