aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-12-08 13:46:29 -0800
committerAndrew Kelley <andrew@ziglang.org>2025-12-23 22:15:08 -0800
commit264d714321d3e5f1f189af393e1fb24d101a7e91 (patch)
treecb637a9c8c8565790db5b8cbcd1e960f88523da1 /lib/std/Build
parentf53248a40936ebc9aaf75ddbd16e67ebec05ab84 (diff)
downloadzig-264d714321d3e5f1f189af393e1fb24d101a7e91.tar.gz
zig-264d714321d3e5f1f189af393e1fb24d101a7e91.zip
update all openDir() sites to accept io instance
Diffstat (limited to 'lib/std/Build')
-rw-r--r--lib/std/Build/Cache/Path.zig3
-rw-r--r--lib/std/Build/Step/InstallArtifact.zig2
-rw-r--r--lib/std/Build/Step/WriteFile.zig2
3 files changed, 4 insertions, 3 deletions
diff --git a/lib/std/Build/Cache/Path.zig b/lib/std/Build/Cache/Path.zig
index 60211670de..93e0c0d792 100644
--- a/lib/std/Build/Cache/Path.zig
+++ b/lib/std/Build/Cache/Path.zig
@@ -71,6 +71,7 @@ pub fn openFile(p: Path, io: Io, sub_path: []const u8, flags: Io.File.OpenFlags)
pub fn openDir(
p: Path,
+ io: Io,
sub_path: []const u8,
args: Io.Dir.OpenOptions,
) Io.Dir.OpenError!Io.Dir {
@@ -80,7 +81,7 @@ pub fn openDir(
p.sub_path, sub_path,
}) catch return error.NameTooLong;
};
- return p.root_dir.handle.openDir(joined_path, args);
+ return p.root_dir.handle.openDir(io, joined_path, args);
}
pub fn makeOpenPath(p: Path, sub_path: []const u8, opts: Io.Dir.OpenOptions) !Io.Dir {
diff --git a/lib/std/Build/Step/InstallArtifact.zig b/lib/std/Build/Step/InstallArtifact.zig
index 1cdb232770..4c1506aa33 100644
--- a/lib/std/Build/Step/InstallArtifact.zig
+++ b/lib/std/Build/Step/InstallArtifact.zig
@@ -164,7 +164,7 @@ fn make(step: *Step, options: Step.MakeOptions) !void {
const src_dir_path = dir.source.getPath3(b, step);
const full_h_prefix = b.getInstallPath(h_dir, dir.dest_rel_path);
- var src_dir = src_dir_path.root_dir.handle.openDir(src_dir_path.subPathOrDot(), .{ .iterate = true }) catch |err| {
+ var src_dir = src_dir_path.root_dir.handle.openDir(io, src_dir_path.subPathOrDot(), .{ .iterate = true }) catch |err| {
return step.fail("unable to open source directory '{f}': {s}", .{
src_dir_path, @errorName(err),
});
diff --git a/lib/std/Build/Step/WriteFile.zig b/lib/std/Build/Step/WriteFile.zig
index 2834f18564..353c85fecf 100644
--- a/lib/std/Build/Step/WriteFile.zig
+++ b/lib/std/Build/Step/WriteFile.zig
@@ -218,7 +218,7 @@ fn make(step: *Step, options: Step.MakeOptions) !void {
const need_derived_inputs = try step.addDirectoryWatchInput(dir.source);
const src_dir_path = dir.source.getPath3(b, step);
- var src_dir = src_dir_path.root_dir.handle.openDir(src_dir_path.subPathOrDot(), .{ .iterate = true }) catch |err| {
+ var src_dir = src_dir_path.root_dir.handle.openDir(io, src_dir_path.subPathOrDot(), .{ .iterate = true }) catch |err| {
return step.fail("unable to open source directory '{f}': {s}", .{
src_dir_path, @errorName(err),
});