mirror of
https://github.com/ziglang/zig.git
synced 2024-11-16 00:57:04 +00:00
std.posix: handle INVAL in openatWasi
In accordance with https://github.com/ziglang/zig/pull/19833#issuecomment-2089262607
This commit is contained in:
parent
b4e7b6fdba
commit
0403c4b05c
@ -1676,10 +1676,8 @@ pub fn openatWasi(
|
||||
.INTR => continue,
|
||||
|
||||
.FAULT => unreachable,
|
||||
// FIXME: It is worth looking into returning a `error.BadPathName`
|
||||
// here if wasi follows other posix behavior
|
||||
// see: https://github.com/ziglang/zig/issues/15607
|
||||
.INVAL => unreachable,
|
||||
// Provides INVAL with a linux host on a bad path name, but NOENT on Windows
|
||||
.INVAL => return error.BadPathName,
|
||||
.BADF => unreachable,
|
||||
.ACCES => return error.AccessDenied,
|
||||
.FBIG => return error.FileTooBig,
|
||||
|
Loading…
Reference in New Issue
Block a user