From aff2c3234fdc881349f3e1234ee911c30ad1fec7 Mon Sep 17 00:00:00 2001 From: Techatrix <19954306+Techatrix@users.noreply.github.com> Date: Mon, 10 Oct 2022 19:43:50 +0200 Subject: [PATCH] fix relative_builtin_path option --- src/DocumentStore.zig | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/DocumentStore.zig b/src/DocumentStore.zig index 00e63fe..37aa679 100644 --- a/src/DocumentStore.zig +++ b/src/DocumentStore.zig @@ -553,9 +553,7 @@ fn createBuildFile(self: *const DocumentStore, uri: Uri) error{OutOfMemory}!Buil if (config.relative_builtin_path) |relative_builtin_path| blk: { const build_file_path = URI.parse(self.allocator, build_file.uri) catch break :blk; - const directory_path = std.fs.path.resolve(self.allocator, &.{ build_file_path, "../build.zig" }) catch break :blk; - defer self.allocator.free(directory_path); - var absolute_builtin_path = try std.mem.concat(self.allocator, u8, &.{ directory_path, relative_builtin_path }); + const absolute_builtin_path = std.fs.path.resolve(self.allocator, &.{ build_file_path, "../", relative_builtin_path }) catch break :blk; defer self.allocator.free(absolute_builtin_path); build_file.builtin_uri = try URI.fromPath(self.allocator, absolute_builtin_path); }