properly cleanup std.fs.Walker in build.zig

This commit is contained in:
Quinten Kock 2020-12-23 04:10:05 +01:00
parent 29bc4daf9e
commit 725b2bd873
1 changed files with 1 additions and 0 deletions

View File

@ -148,6 +148,7 @@ fn fileExtEql(name: []const u8, ext: []const u8) bool {
fn findSources(dir: []const u8, ext: []const u8, prefix: ?[]const u8) ![][] const u8 {
var files = std.ArrayList([]const u8).init(alloc);
var walker = try std.fs.walkPath(alloc, dir);
defer walker.deinit();
while (try walker.next()) |entry| {
if(entry.kind != std.fs.Dir.Entry.Kind.File) continue;