From 446292e15d56c9c248dae5d6fde1be3a83ade82e Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 9 Nov 2026 03:29:30 -0300 Subject: idioms: the 9P tree's swallows decided: a directory read stages every entry or answers ENOMEM (stageDirent and sources.stage return error{OutOfMemory}, readdir's entries made by stageDir, an /os listing whose buffer fills ends there), a pane's tag read through tagOf fails by name (a read or an event write answers ENOMEM, a stat's length and ctl's line say 0), a pane that cannot close (removePane's nine swallowing callers) and a /pager text that cannot go in (fillClosedPagers) are said on their pane, and Queue.push says once why a lost record is not said Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/fs.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/fs.zig') diff --git a/src/fs.zig b/src/fs.zig index 8e7ec346..a0092991 100644 --- a/src/fs.zig +++ b/src/fs.zig @@ -249,7 +249,8 @@ fn osListing(io: std.Io, path: []const u8, off: u64, size: u32, listing: *[16 * continue; } const node = if (std.mem.eql(u8, normalized.path, "/")) os_root else os_node | (std.hash.Wyhash.hash(0, normalized.path) & (os_node - 1)); - tree.stageDirent(&listed, fixed.allocator(), node, child.kind == .directory, entry.name); + // The listing's buffer is full: it ends here, the next read goes on. + tree.stageDirent(&listed, fixed.allocator(), node, child.kind == .directory, entry.name) catch break; if (listed.items.len >= @max(size, 512)) break; } return listed.items; -- cgit v1.3