diff options
Diffstat (limited to 'src/ninep/ctl.zig')
| -rw-r--r-- | src/ninep/ctl.zig | 4 |
1 files changed, 2 insertions, 2 deletions
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"); |
