Merge pull request #1205 from tt/resolve-path-relative-to-base

Resolve path relative to base
This commit is contained in:
Mitchell Hashimoto
2024-01-03 14:36:59 -08:00
committed by GitHub

View File

@ -2312,7 +2312,7 @@ pub const RepeatablePath = struct {
// If it isn't absolute, we need to make it absolute relative // If it isn't absolute, we need to make it absolute relative
// to the base. // to the base.
var buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; var buf: [std.fs.MAX_PATH_BYTES]u8 = undefined;
const abs = std.os.realpath(path, &buf) catch |err| { const abs = dir.realpath(path, &buf) catch |err| {
try errors.add(alloc, .{ try errors.add(alloc, .{
.message = try std.fmt.allocPrintZ( .message = try std.fmt.allocPrintZ(
alloc, alloc,