diff options
Diffstat (limited to 'git.zig')
| -rw-r--r-- | git.zig | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -122,15 +122,15 @@ const PackFile = struct { while (try packIt.next()) |f| { if (std.mem.endsWith(u8, f.name, ".idx")) { const idxFilename = f.name; - var pckFilename = try std.BoundedArray(u8, std.fs.max_path_bytes).init(0); - try std.fmt.format( - pckFilename.writer(), + var pckFilenameBuf: [std.fs.max_path_bytes]u8 = undefined; + const pckFilename = try std.fmt.bufPrint( + &pckFilenameBuf, "{s}.pack", .{idxFilename[0 .. idxFilename.len - 4]}, ); self.idxFile = try packDir.openFile(idxFilename, .{}); - self.pckFile = try packDir.openFile(pckFilename.constSlice(), .{}); + self.pckFile = try packDir.openFile(pckFilename, .{}); try self.parseIndex(); |
