Skip to content

Commit 6426519

Browse files
squeek502andrewrk
authored andcommitted
zig fmt: Remove workaround for . and .. path handling on Windows
Added in #4655/#5187, obsoleted by #7664
1 parent 75cd37b commit 6426519

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/main.zig

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2986,13 +2986,7 @@ pub fn cmdFmt(gpa: *Allocator, args: []const []const u8) !void {
29862986
defer fmt.out_buffer.deinit();
29872987

29882988
for (input_files.items) |file_path| {
2989-
// Get the real path here to avoid Windows failing on relative file paths with . or .. in them.
2990-
const real_path = fs.realpathAlloc(gpa, file_path) catch |err| {
2991-
fatal("unable to open '{s}': {s}", .{ file_path, @errorName(err) });
2992-
};
2993-
defer gpa.free(real_path);
2994-
2995-
try fmtPath(&fmt, file_path, check_flag, fs.cwd(), real_path);
2989+
try fmtPath(&fmt, file_path, check_flag, fs.cwd(), file_path);
29962990
}
29972991
if (fmt.any_error) {
29982992
process.exit(1);

0 commit comments

Comments
 (0)