authorgravatar for squeek502@hotmail.comRyan Liptak <squeek502@hotmail.com> 2021-06-23 17:22:34-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-07-21 12:25:05-07:00
logba47e0937321d2371875fbc3d8cecbd9bfe407b1
tree78af4b4fa72415dfeb83ba4d1075b6a4a69d736f
parent1063bf696ed27d58d0c869f7b1f663a6c68b68c1

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
......@@ -3652,6 +3652,7 @@ pub const INotifyAddWatchError = error{
36523652 FileNotFound,
36533653 SystemResources,
36543654 UserResourceLimitReached,
3655 NotDir,
36553656} || UnexpectedError;
36563657
36573658/// 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
36753676 ENOENT => return error.FileNotFound,
36763677 ENOMEM => return error.SystemResources,
36773678 ENOSPC => return error.UserResourceLimitReached,
3679 ENOTDIR => return error.NotDir,
36783680 else => |err| return unexpectedErrno(err),
36793681 }
36803682}