summaryrefslogtreecommitdiff
path: root/src/fs.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs.zig')
-rw-r--r--src/fs.zig3
1 files changed, 2 insertions, 1 deletions
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;