aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorRyan Liptak <squeek502@hotmail.com>2021-05-23 16:44:53 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-05-24 13:24:21 -0400
commit6426519e32bc5d0470d6a2775050b9e303823a62 (patch)
treed32b10de91ef6599ca53f1f8f3962d12eb0a94f1 /src/main.zig
parent75cd37b8f7c88e87b889a30ce741a3c257002732 (diff)
downloadzig-6426519e32bc5d0470d6a2775050b9e303823a62.tar.gz
zig-6426519e32bc5d0470d6a2775050b9e303823a62.zip
zig fmt: Remove workaround for . and .. path handling on Windows
Added in #4655/#5187, obsoleted by #7664
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/main.zig b/src/main.zig
index 2b144f2cf8..4b8f30b109 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);