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