mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
libstd: handle rmdirZ INVAL error (#10145)
The INVAL error was marked unreachable which prevents handling of the error at a higher level. It seems like it should map to BadPathError based on the man page for rmdir (and an incomplete understanding of DeleteDirError), which says: ``` EINVAL pathname has . as last component. ```
This commit is contained in:
parent
1e0addcf73
commit
89afd4bd33
@ -2538,7 +2538,7 @@ pub fn rmdirZ(dir_path: [*:0]const u8) DeleteDirError!void {
|
||||
.PERM => return error.AccessDenied,
|
||||
.BUSY => return error.FileBusy,
|
||||
.FAULT => unreachable,
|
||||
.INVAL => unreachable,
|
||||
.INVAL => return error.BadPathName,
|
||||
.LOOP => return error.SymLinkLoop,
|
||||
.NAMETOOLONG => return error.NameTooLong,
|
||||
.NOENT => return error.FileNotFound,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user