Skip to content

Commit

Permalink
Set .iterate = true on dirs that will be traversed
Browse files Browse the repository at this point in the history
  • Loading branch information
jedisct1 committed Nov 24, 2023
1 parent 547dde9 commit 6d90629
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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(.{});
Expand Down Expand Up @@ -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", .{});
Expand Down

0 comments on commit 6d90629

Please sign in to comment.