From 41b133b930cfe07fd3ec89824bc43f0a865fb2be Mon Sep 17 00:00:00 2001 From: Hamcha Date: Fri, 7 Jun 2024 16:09:21 +0200 Subject: [PATCH] stop .zig-cache from breaking filenames --- src/buildlib.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/buildlib.zig b/src/buildlib.zig index 4736a6f..e2aa8fb 100644 --- a/src/buildlib.zig +++ b/src/buildlib.zig @@ -70,7 +70,7 @@ fn make(step: *std.Build.Step, _: std.Progress.Node) !void { } fn calculateOutputName(b: *std.Build, path: []const u8) []const u8 { - const extIndex = std.mem.lastIndexOfScalar(u8, path, '.'); + const extIndex = std.mem.lastIndexOfScalar(u8, std.fs.path.basename(path), '.'); const filenameWithoutExtension = if (extIndex) |index| path[0..index] else path; return b.fmt("{s}.dol", .{filenameWithoutExtension}); }