From e07d291429c505c036313d6ff9bb56a2316f149f Mon Sep 17 00:00:00 2001 From: Ryan Liptak Date: Sun, 23 May 2021 16:44:53 -0700 Subject: [PATCH] zig fmt: Remove workaround for . and .. path handling on Windows Added in #4655/#5187, obsoleted by #7664 --- src/main.zig | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/main.zig b/src/main.zig index 2b144f2cf80b..4b8f30b10935 100644 --- a/src/main.zig +++ b/src/main.zig @@ -2986,13 +2986,7 @@ pub fn cmdFmt(gpa: *Allocator, args: []const []const u8) !void { defer fmt.out_buffer.deinit(); for (input_files.items) |file_path| { - // Get the real path here to avoid Windows failing on relative file paths with . or .. in them. - const real_path = fs.realpathAlloc(gpa, file_path) catch |err| { - fatal("unable to open '{s}': {s}", .{ file_path, @errorName(err) }); - }; - defer gpa.free(real_path); - - try fmtPath(&fmt, file_path, check_flag, fs.cwd(), real_path); + try fmtPath(&fmt, file_path, check_flag, fs.cwd(), file_path); } if (fmt.any_error) { process.exit(1);