diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-06 12:40:11 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-06 14:56:36 -0300 |
| commit | 36a51ddc67d0beb7d9851fb2425cf780a47fed36 (patch) | |
| tree | d534d3151d836ea7a275e9f118a89f2bbc0d0448 /src/ninep/sources.zig | |
| parent | 4917ae452a15ff4f32d97d215a99fdcfaab29d61 (diff) | |
| download | pardes-36a51ddc67d0beb7d9851fb2425cf780a47fed36.tar.gz pardes-36a51ddc67d0beb7d9851fb2425cf780a47fed36.zip | |
idioms #10, the 9P tree: every bufPrint that fell back to "" or a placeholder is proven to fit (catch unreachable, its why) or cut its argument to fit, /status, /listeners and the 9P reads that staged on gpa answer ENOMEM rather than read short, acme's pane ctl words and pty's files and signals are stringToEnum switches, a dirent's head and name are staged together or not at all, a repeated log record too long to count is pushed as its own line rather than dropped, and daemonList's set is named
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/ninep/sources.zig')
| -rw-r--r-- | src/ninep/sources.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ninep/sources.zig b/src/ninep/sources.zig index 846ab758..32edb1f6 100644 --- a/src/ninep/sources.zig +++ b/src/ninep/sources.zig @@ -69,7 +69,7 @@ pub fn handle(p: *Pardes, req: Req) Reply { const found = info(req.node) orelse return Reply.fail(req.tag, E.NOENT); const attr: Reply.Attr = .{ .node = req.node, - .name = std.fs.path.basename(found.path), + .name = std.Io.Dir.path.basename(found.path), .dir = found.dir, .size = if (found.dir) 0 else found.contents.len, .mode = if (found.dir) 0o555 else 0o444, @@ -82,7 +82,7 @@ pub fn handle(p: *Pardes, req: Req) Reply { .lookup => { if (!found.dir) return Reply.fail(req.tag, E.NOTDIR); if (std.mem.eql(u8, req.data, "..")) { - const parent = std.fs.path.dirname(found.path) orelse ""; + const parent = std.Io.Dir.path.dirname(found.path) orelse ""; if (parent.len == 0) return tree.handle(p, .{ .tag = req.tag, .op = .getattr, .node = tree.root }); const parent_node = node(parent) orelse return Reply.fail(req.tag, E.NOENT); return handle(p, .{ .tag = req.tag, .op = .getattr, .node = parent_node }); |
