From a0d367b6c54ff29737662fd7cf5a78d4d183cb20 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 23 Oct 2026 10:56:33 -0300 Subject: Audit (core, modal): goto/insert/select tables, edit through sam.Op and sam.apply, Turn.bump and awaitPast, dead helpers out Co-Authored-By: Claude Opus 5.5 --- src/ninep/ctl.zig | 4 ++-- src/ninep/pane.zig | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ninep') diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig index 480c1dc7..f9bec775 100644 --- a/src/ninep/ctl.zig +++ b/src/ninep/ctl.zig @@ -110,7 +110,7 @@ pub fn run(p: *Pardes, id: usize, exec: bool, text: []const u8, in_tag: bool) vo /// A write's messages, a line each, except that an `Edit` line takes the /// lines after it while its `{` group or `a`/`c`/`i` text block is open -/// (sam_edit.needsMore): a block written whole reaches Edit whole, never +/// (sam_edit.waitsFor): a block written whole reaches Edit whole, never /// as lines of their own. const Messages = struct { p: *Pardes, @@ -708,7 +708,7 @@ pub fn writePager(p: *Pardes, req: Req) Reply { var shown: [256]u8 = undefined; return tree.failText(req.tag, E.INVAL, std.fmt.bufPrint(&p.fs.ename, "pager: invalid directory \"{s}\": must be absolute", .{blanked(dir[0..@min(dir.len, shown.len)], &shown)}) catch "pager: invalid directory: must be absolute"); } - if (comptime pardes.hosted) if (dir.len > 0) if (pardes.filesystem.localPath(dir)) |local| if (!exec_line.isDirectory(local)) { + if (comptime pardes.hosted) if (dir.len > 0) if (pardes.filesystem.localPath(dir)) |local| if (exec_line.kindOf(local) != .directory) { // A file there is no directory, ENOTDIR; nothing there, ENOENT. if (exec_line.kindOf(local) != null) return tree.failText(req.tag, E.NOTDIR, std.fmt.bufPrint(&p.fs.ename, "pager: {s}: not a directory", .{dir[0..@min(dir.len, 256)]}) catch "pager: not a directory"); diff --git a/src/ninep/pane.zig b/src/ninep/pane.zig index dc104e4b..f9112ae2 100644 --- a/src/ninep/pane.zig +++ b/src/ninep/pane.zig @@ -963,7 +963,7 @@ fn writeName(p: *Pardes, req: Req, id: usize, pane: *Pane) Reply { // A directory (`~`, `/`, `foo/`) is no file to name a pane after: a // Save could only fail. Said now, EISDIR. const is_dir = name[name.len - 1] == '/' or std.mem.eql(u8, full, "/") or - (if (comptime pardes.hosted) (if (fs.localPath(full)) |local| exec.isDirectory(local) else false) else false); + (if (comptime pardes.hosted) (if (fs.localPath(full)) |local| exec.kindOf(local) == .directory else false) else false); if (is_dir) return tree.failText(req.tag, E.ISDIR, std.fmt.bufPrint(&p.fs.ename, "name: {s} is a directory, not a file", .{full[0..@min(full.len, 256)]}) catch "name: is a directory, not a file"); nameBuffer(p, id, full, false) catch |err| return Reply.fail(req.tag, switch (err) { error.OutOfMemory => E.NOMEM, -- cgit v1.3