From c922ed62e1e3d0e33ed34e9cefa416c0d8d62b2f Mon Sep 17 00:00:00 2001 From: cozis Date: Tue, 2 Jun 2026 11:43:15 +0200 Subject: [PATCH] file_system: Improve output of the dump function --- src/file_system.zig | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/file_system.zig b/src/file_system.zig index 0f61c2c..415c9ca 100644 --- a/src/file_system.zig +++ b/src/file_system.zig @@ -483,6 +483,10 @@ fn dumpEntity(entity: *Entity, depth: u32) void { } pub fn dump(self: *FileSystem) void { - dumpEntity(self.root, 0); - std.debug.print("\n", .{}); + if (self.root.children.items.len == 0) { + std.debug.print("(no files)\n", .{}); + } else { + dumpEntity(self.root, 0); + std.debug.print("\n", .{}); + } }