summaryrefslogtreecommitdiff
path: root/src/9p_io.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-01 05:01:31 -0300
committerGabriel Schneider <[email protected]>2026-10-01 05:18:09 -0300
commit250db41743f77ce3d8421f729bdea0065aa6bc79 (patch)
tree906bbefca6d448ba04c81c93cf552e23b5e6c3a4 /src/9p_io.zig
parent36fe45e3a4a7ce9b61ab7bf2df07f0132a9170c1 (diff)
downloadpardes-250db41743f77ce3d8421f729bdea0065aa6bc79.tar.gz
pardes-250db41743f77ce3d8421f729bdea0065aa6bc79.zip
A name under a directory that may not be searched or written is refused, permission denied, and a Save there says so, not no such directory
`pardes noperm/a/b/c` and `pardes /proc/1/root/x` took the missing directory for one Save would make, opened a pane and exited 0; its Save then said "no such directory". fs.deniedAbove finds the nearest directory there and asks whether it may be searched and written: forwarding refuses such a name, exit 1, "permission denied", and a failed Save says "permission denied", which the writer's 9P error carries as EPERM (9ns: EACCES). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/9p_io.zig')
-rw-r--r--src/9p_io.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/9p_io.zig b/src/9p_io.zig
index 9fc19df9..ea3f799c 100644
--- a/src/9p_io.zig
+++ b/src/9p_io.zig
@@ -328,7 +328,7 @@ pub const Listener = struct {
// builtin's failure saying so is (ctl.failureErrno).
const errno = if (std.mem.indexOf(u8, late, "no such") != null or std.mem.indexOf(u8, late, "not found") != null)
pardes.ctlfs.E.NOENT
- else if (std.mem.indexOf(u8, late, "no space") != null) pardes.ctlfs.E.NOSPC else pardes.ctlfs.E.IO;
+ else if (std.mem.indexOf(u8, late, "no space") != null) pardes.ctlfs.E.NOSPC else if (std.mem.indexOf(u8, late, "permission denied") != null) pardes.ctlfs.E.PERM else pardes.ctlfs.E.IO;
const failed = pardes.ctlfs.failText(req.tag, errno, late);
// Its err record says it (the path in it), the one record: it
// was said with no msg while this waited (fs.write_waits).