From 6d906294c9a97cf7b69d5787f12ba6c19caf7d54 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 24 Nov 2023 14:54:56 +0100 Subject: [PATCH] Set .iterate = true on dirs that will be traversed --- build.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.zig b/build.zig index 3a5c7e6b..00bd2bbe 100644 --- a/build.zig +++ b/build.zig @@ -12,7 +12,7 @@ pub fn build(b: *std.build.Builder) !void { defer cwd.close(); const src_path = "src/libsodium"; - const src_dir = try fs.Dir.openDir(cwd, src_path, .{ .no_follow = true }); + const src_dir = try fs.Dir.openDir(cwd, src_path, .{ .iterate = true, .no_follow = true }); var target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); @@ -265,7 +265,7 @@ pub fn build(b: *std.build.Builder) !void { const test_path = "test/default"; const out_bin_path = "zig-out/bin"; - const test_dir = try fs.Dir.openDir(cwd, test_path, .{ .no_follow = true }); + const test_dir = try fs.Dir.openDir(cwd, test_path, .{ .iterate = true, .no_follow = true }); fs.Dir.makePath(cwd, out_bin_path) catch {}; const out_bin_dir = try fs.Dir.openDir(cwd, out_bin_path, .{}); try test_dir.copyFile("run.sh", out_bin_dir, "run.sh", .{});