diff options
| author | Ketan Reynolds <ketan.cs.reynolds@gmail.com> | 2024-05-02 10:02:04 +0200 |
|---|---|---|
| committer | Ryan Liptak <squeek502@hotmail.com> | 2024-07-28 19:01:55 -0700 |
| commit | 0403c4b05c811576ee205438e3782986d64f8056 (patch) | |
| tree | 9807951eac750cde314cae1a1c9cdc9d867b4e15 /lib/std | |
| parent | b4e7b6fdba2e4e212f8fa1e258ab6e869691baf0 (diff) | |
| download | zig-0403c4b05c811576ee205438e3782986d64f8056.tar.gz zig-0403c4b05c811576ee205438e3782986d64f8056.zip | |
std.posix: handle INVAL in openatWasi
In accordance with https://github.com/ziglang/zig/pull/19833#issuecomment-2089262607
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/posix.zig | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/std/posix.zig b/lib/std/posix.zig index fafdf885e2..54f414ddbb 100644 --- a/lib/std/posix.zig +++ b/lib/std/posix.zig @@ -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, |
