Skip to content

Commit

Permalink
Merge pull request ziglang#22536 from BryceVandegrift/access-er13
Browse files Browse the repository at this point in the history
std.posix: Fix errno 13 when writing to file
  • Loading branch information
andrewrk authored Jan 21, 2025
2 parents 160445e + 1110950 commit 744771d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/std/posix.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1169,8 +1169,7 @@ pub const WriteError = error{
DeviceBusy,
InvalidArgument,

/// In WASI, this error may occur when the file descriptor does
/// not hold the required rights to write to it.
/// File descriptor does not hold the required rights to write to it.
AccessDenied,
BrokenPipe,
SystemResources,
Expand Down Expand Up @@ -1269,6 +1268,7 @@ pub fn write(fd: fd_t, bytes: []const u8) WriteError!usize {
.FBIG => return error.FileTooBig,
.IO => return error.InputOutput,
.NOSPC => return error.NoSpaceLeft,
.ACCES => return error.AccessDenied,
.PERM => return error.AccessDenied,
.PIPE => return error.BrokenPipe,
.CONNRESET => return error.ConnectionResetByPeer,
Expand Down

0 comments on commit 744771d

Please sign in to comment.