From 11a9dd9dad6e9992dbe767b0ba321638a3808131 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Sun, 26 May 2024 17:46:26 +0200 Subject: [PATCH] build: prevent breakage with relative paths `root()` returns `@src().file` which isn't guaranteed to be an absolute path --- build.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.zig b/build.zig index 860a1211e..84a0c5476 100644 --- a/build.zig +++ b/build.zig @@ -1387,7 +1387,7 @@ fn benchSteps( ) !void { // Open the directory ./src/bench const c_dir_path = (comptime root()) ++ "/src/bench"; - var c_dir = try fs.openDirAbsolute(c_dir_path, .{ .iterate = true }); + var c_dir = try fs.cwd().openDir(c_dir_path, .{ .iterate = true }); defer c_dir.close(); // Go through and add each as a step @@ -1443,7 +1443,7 @@ fn conformanceSteps( // Open the directory ./conformance const c_dir_path = (comptime root()) ++ "/conformance"; - var c_dir = try fs.openDirAbsolute(c_dir_path, .{ .iterate = true }); + var c_dir = try fs.cwd().openDir(c_dir_path, .{ .iterate = true }); defer c_dir.close(); // Go through and add each as a step