diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-30 21:29:39 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:17 -0300 |
| commit | 20685b048fcb307840451471679339c9b9704b23 (patch) | |
| tree | 8a803f1551ac117c41d271ff972c26a259500569 /src/ninep/tree.zig | |
| parent | 237071bd4865f0220c35c8c37895c8dba48aed84 (diff) | |
| download | pardes-20685b048fcb307840451471679339c9b9704b23.tar.gz pardes-20685b048fcb307840451471679339c9b9704b23.zip | |
name takes any byte a file name can hold, controls, edge blanks and bytes not UTF-8 included, so what name reads writes back as it was
A pane opened on a file whose name held a tab, a control byte or bytes
not UTF-8 read that name from its name file, and the same bytes written
back were refused. Only what no file name holds is refused now: a second
line and a NUL. The ctl word name still refuses a second blank after the
word, as a line's words are split at blanks.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/ninep/tree.zig')
| -rw-r--r-- | src/ninep/tree.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ninep/tree.zig b/src/ninep/tree.zig index a7f3f2a4..be03e8f0 100644 --- a/src/ninep/tree.zig +++ b/src/ninep/tree.zig @@ -1802,9 +1802,9 @@ test "a write with no newline, whole in its Twrite, runs then and fails the writ // And a name: a bad one fails its write, not the close after it. const name = Node.of(serial, .name); const n = call(p, .{ .tag = 10, .op = .open, .node = name, .omode = 1 }).reply.handle; - const bad = call(p, .{ .tag = 11, .op = .write, .node = name, .handle = n, .data = "delete " }); + const bad = call(p, .{ .tag = 11, .op = .write, .node = name, .handle = n, .data = "del\x00ete" }); try testing.expectEqual(Status.err, bad.reply.status); - try testing.expect(std.mem.indexOf(u8, bad.reply.ename, "a blank at its end") != null); + try testing.expect(std.mem.indexOf(u8, bad.reply.ename, "a NUL") != null); try testing.expectEqual(Status.ok, call(p, .{ .tag = 12, .op = .release, .node = name, .handle = n, .opened = true }).reply.status); } |
