| ... | @@ -117,9 +117,7 @@ pub fn fileList(alloc: *std.mem.Allocator, dir: std.fs.Dir) ![]string { | ... | @@ -117,9 +117,7 @@ pub fn fileList(alloc: *std.mem.Allocator, dir: std.fs.Dir) ![]string { |
| 117 | var walk = try dir.walk(alloc); | 117 | var walk = try dir.walk(alloc); |
| 118 | defer walk.deinit(); | 118 | defer walk.deinit(); |
| 119 | while (try walk.next()) |entry| { | 119 | while (try walk.next()) |entry| { |
| 120 | if (entry.kind != .File) { | 120 | if (entry.kind != .File) continue; |
| 121 | continue; | | |
| 122 | } | | |
| 123 | try list.append(try alloc.dupe(u8, entry.path)); | 121 | try list.append(try alloc.dupe(u8, entry.path)); |
| 124 | } | 122 | } |
| 125 | return list.toOwnedSlice(); | 123 | return list.toOwnedSlice(); |
| ... | @@ -131,9 +129,7 @@ pub fn dirSize(alloc: *std.mem.Allocator, dir: std.fs.Dir) !usize { | ... | @@ -131,9 +129,7 @@ pub fn dirSize(alloc: *std.mem.Allocator, dir: std.fs.Dir) !usize { |
| 131 | var walk = try dir.walk(alloc); | 129 | var walk = try dir.walk(alloc); |
| 132 | defer walk.deinit(); | 130 | defer walk.deinit(); |
| 133 | while (try walk.next()) |entry| { | 131 | while (try walk.next()) |entry| { |
| 134 | if (entry.kind != .File) { | 132 | if (entry.kind != .File) continue; |
| 135 | continue; | | |
| 136 | } | | |
| 137 | res += try fileSize(dir, entry.path); | 133 | res += try fileSize(dir, entry.path); |
| 138 | } | 134 | } |
| 139 | return res; | 135 | return res; |