commit c1493635fba7e1205c1e04c0e01f2245aa2a0cc8 (tree)
parent ba5cbea0c3c6ee2e22606365edde18342fcf0579
Author: Jacob Young <jacobly0@users.noreply.github.com>
Date: Sat, 17 Sep 2022 13:49:32 -0400
fmt: ignore non-files
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main.zig b/src/main.zig
@@ -4317,7 +4317,7 @@ fn fmtPathDir(
if (is_dir and (mem.eql(u8, entry.name, "zig-cache") or mem.eql(u8, entry.name, "zig-out"))) continue;
- if (is_dir or mem.endsWith(u8, entry.name, ".zig")) {
+ if (is_dir or entry.kind == .File and mem.endsWith(u8, entry.name, ".zig")) {
const full_path = try fs.path.join(fmt.gpa, &[_][]const u8{ file_path, entry.name });
defer fmt.gpa.free(full_path);