summaryrefslogtreecommitdiff
path: root/src/ninep/tree.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-01 11:28:48 -0300
committerGabriel Schneider <[email protected]>2026-10-01 11:28:48 -0300
commit9e30f716e73b4b830b0fde7c5142d8f6b8deb511 (patch)
tree59709ca2f1ef996a23322da1865b4e4d41b24950 /src/ninep/tree.zig
parent6d8bd80429102cb06947f92c2bde00292cae05d5 (diff)
downloadpardes-9e30f716e73b4b830b0fde7c5142d8f6b8deb511.tar.gz
pardes-9e30f716e73b4b830b0fde7c5142d8f6b8deb511.zip
A name held for its newline that no newline could make good (a terminal's, a component over 255 bytes, a path too long) is refused by the write that held it, not at the close (monkey9p's close_runs_only_line_files; follows sswkwwvv)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/ninep/tree.zig')
-rw-r--r--src/ninep/tree.zig5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ninep/tree.zig b/src/ninep/tree.zig
index b0ffdd68..1990d09e 100644
--- a/src/ninep/tree.zig
+++ b/src/ninep/tree.zig
@@ -1278,6 +1278,11 @@ fn writeLines(p: *Pardes, req: Req, target: Target) Reply {
// its message is no whole line. An Edit block is whole when it closes.
const end = ctl.completeEnd(p, o.pending.items);
if (end == 0) {
+ if (target == .pane and target.pane.file == .name) if (pane.heldNameFault(p, target.pane.serial, o.pending.items)) |why| {
+ o.pending.clearRetainingCapacity();
+ o.discarding = true;
+ return failText(req.tag, E.INVAL, why);
+ };
if (o.pending.items.len <= pending_cap) return .{ .tag = req.tag, .written = @intCast(req.data.len) };
o.pending.clearRetainingCapacity();
o.discarding = true;