diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-30 21:19:57 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:17 -0300 |
| commit | 137dc2ea4be0fc5baf4cab1d8a757ce426e5cbb2 (patch) | |
| tree | b4dba1252b54a135c5afe972bf4193f31219703a /src/ninep/ctl.zig | |
| parent | f02c10bfa6d02d305ddb6d7a28b12c40035274c7 (diff) | |
| download | pardes-137dc2ea4be0fc5baf4cab1d8a757ce426e5cbb2.tar.gz pardes-137dc2ea4be0fc5baf4cab1d8a757ce426e5cbb2.zip | |
Views generated by each read stat 0, as acme's do: data, xdata, index, layout, recent and listeners; fs.md says which files have real lengths
A stat of index, layout, recent or listeners built the whole view to
count it, and data and xdata reported the body's length though a read
answers what addr selects. Those now stat 0, as screen and pane/new
already did, and fs.md lists the files whose length is real and says to
read the rest to the end.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/ninep/ctl.zig')
| -rw-r--r-- | src/ninep/ctl.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig index 63f89cdf..fc0558f5 100644 --- a/src/ninep/ctl.zig +++ b/src/ninep/ctl.zig @@ -2932,7 +2932,8 @@ test "/index shows a name as the log does: a newline in it is \\n, controls spac const index = rd(p, @intFromEnum(tree.TopFile.index), 0, 4096).bytes; try testing.expect(std.mem.indexOf(u8, index, "/tmp/two\\nlines \\xff ") != null); try testing.expectEqual(@as(usize, 1), std.mem.count(u8, index, "\n")); - try testing.expectEqual(@as(u64, index.len), call(p, .{ .tag = 1, .op = .getattr, .node = @intFromEnum(tree.TopFile.index) }).reply.attr.size); + try testing.expect(index.len > 0); + try testing.expectEqual(@as(u64, 0), call(p, .{ .tag = 1, .op = .getattr, .node = @intFromEnum(tree.TopFile.index) }).reply.attr.size); // Its tag never carries the raw newline either. const tag = rd(p, Node.of(serialOf(p), .tag), 0, 4096).bytes; try testing.expect(std.mem.indexOf(u8, tag, "/tmp/two\\nlines") != null); |
