Add missing iteration permissions
Some checks failed
AWS-Zig Build / build-zig-0.11.0-amd64-host (push) Failing after 30s

This commit is contained in:
melhindi 2024-01-19 15:24:34 +01:00
parent b71be1f03e
commit d84824b84e
2 changed files with 9 additions and 3 deletions

View File

@ -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 .{

View File

@ -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);