From 7fe3f5cd3f39f0566ff5ff9babca35e3b91a6675 Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Mon, 1 Dec 2025 18:23:37 -0600 Subject: [PATCH] build: fix path access to work with relative build roots Replace std.fs.accessAbsolute(b.pathFromRoot(...)) with b.build_root.handle.access(...) since pathFromRoot can return relative paths, but accessAbsolute asserts the path is absolute. --- src/build/GhosttyDist.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/build/GhosttyDist.zig b/src/build/GhosttyDist.zig index 092322689..600aa4883 100644 --- a/src/build/GhosttyDist.zig +++ b/src/build/GhosttyDist.zig @@ -170,11 +170,11 @@ pub const Resource = struct { /// Returns true if the dist path exists at build time. pub fn exists(self: *const Resource, b: *std.Build) bool { - if (std.fs.accessAbsolute(b.pathFromRoot(self.dist), .{})) { + if (b.build_root.handle.access(self.dist, .{})) { // If we have a ".git" directory then we're a git checkout // and we never want to use the dist path. This shouldn't happen // so show a warning to the user. - if (std.fs.accessAbsolute(b.pathFromRoot(".git"), .{})) { + if (b.build_root.handle.access(".git", .{})) { std.log.warn( "dist resource '{s}' should not be in a git checkout", .{self.dist},