diff --git a/lib/std/os.zig b/lib/std/os.zig index 5923f90a63..b3c8231123 100644 --- a/lib/std/os.zig +++ b/lib/std/os.zig @@ -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,