Skip to content

Commit 744771d

Browse files
authored
Merge pull request ziglang#22536 from BryceVandegrift/access-er13
std.posix: Fix errno 13 when writing to file
2 parents 160445e + 1110950 commit 744771d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/std/posix.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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,

0 commit comments

Comments
 (0)