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{...@@ -3667,6 +3667,7 @@ pub const INotifyAddWatchError = error{
3667 FileNotFound,3667 FileNotFound,
3668 SystemResources,3668 SystemResources,
3669 UserResourceLimitReached,3669 UserResourceLimitReached,
3670 NotDir,
3670} || UnexpectedError;3671} || UnexpectedError;
36713672
3672/// add a watch to an initialized inotify instance3673/// 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...@@ -3690,6 +3691,7 @@ pub fn inotify_add_watchZ(inotify_fd: i32, pathname: [*:0]const u8, mask: u32) I
3690 ENOENT => return error.FileNotFound,3691 ENOENT => return error.FileNotFound,
3691 ENOMEM => return error.SystemResources,3692 ENOMEM => return error.SystemResources,
3692 ENOSPC => return error.UserResourceLimitReached,3693 ENOSPC => return error.UserResourceLimitReached,
3694 ENOTDIR => return error.NotDir,
3693 else => |err| return unexpectedErrno(err),3695 else => |err| return unexpectedErrno(err),
3694 }3696 }
3695}3697}