authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-01-21 00:10:05-05:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2025-01-21 00:10:05-05:00
log744771d3303e122474a72c8a94b14fe1e9fb480c
treeb5b558f621516c470ea14d78d24114ca365bd298
parent160445ef316f76dfddfa17b11c4919a3e14f486d
parent1110950528ac0bfe19d92a69d37b502a7465f4a6
signaturebadge-check Signed by PGP key B5690EEEBB952194

Merge pull request #22536 from BryceVandegrift/access-er13

std.posix: Fix errno 13 when writing to file

1 files changed, 2 insertions(+), 2 deletions(-)

lib/std/posix.zig+2-2
......@@ -1169,8 +1169,7 @@ pub const WriteError = error{
11691169 DeviceBusy,
11701170 InvalidArgument,
11711171
1172 /// In WASI, this error may occur when the file descriptor does
1173 /// not hold the required rights to write to it.
1172 /// File descriptor does not hold the required rights to write to it.
11741173 AccessDenied,
11751174 BrokenPipe,
11761175 SystemResources,
......@@ -1269,6 +1268,7 @@ pub fn write(fd: fd_t, bytes: []const u8) WriteError!usize {
12691268 .FBIG => return error.FileTooBig,
12701269 .IO => return error.InputOutput,
12711270 .NOSPC => return error.NoSpaceLeft,
1271 .ACCES => return error.AccessDenied,
12721272 .PERM => return error.AccessDenied,
12731273 .PIPE => return error.BrokenPipe,
12741274 .CONNRESET => return error.ConnectionResetByPeer,