From d84824b84ec634cafdf617af744bc9c683b67af5 Mon Sep 17 00:00:00 2001 From: melhindi Date: Fri, 19 Jan 2024 15:24:34 +0100 Subject: [PATCH] Add missing iteration permissions --- Package.zig | 4 +++- codegen/src/main.zig | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Package.zig b/Package.zig index 6cb36b9..b37b102 100644 --- a/Package.zig +++ b/Package.zig @@ -111,7 +111,9 @@ pub fn fetchAndUnpack( const path = try global_cache_directory.join(gpa, &.{tmp_dir_sub_path}); errdefer gpa.free(path); - const iterable_dir = try global_cache_directory.handle.makeOpenPath(tmp_dir_sub_path, .{}); + const iterable_dir = try global_cache_directory.handle.makeOpenPath(tmp_dir_sub_path, .{ + .iterate = true, + }); errdefer iterable_dir.close(); break :d .{ diff --git a/codegen/src/main.zig b/codegen/src/main.zig index 948dfdc..8665f75 100644 --- a/codegen/src/main.zig +++ b/codegen/src/main.zig @@ -29,9 +29,13 @@ pub fn main() anyerror!void { std.process.exit(0); } if (std.mem.eql(u8, "--output", arg)) - output_dir = try output_dir.makeOpenPath(args[i + 1], .{}); + output_dir = try output_dir.makeOpenPath(args[i + 1], .{ + .iterate = true, + }); if (std.mem.eql(u8, "--models", arg)) - models_dir = try std.fs.cwd().openDir(args[i + 1], .{ .iterate = true }); + models_dir = try std.fs.cwd().openDir(args[i + 1], .{ + .iterate = true, + }); } // TODO: Seems like we should remove this in favor of a package try output_dir.writeFile("json.zig", json_zig);