Exclusive file creation

This commit is contained in:
Caleb J. Gardner
2026-02-12 05:19:25 -06:00
parent 48f4235875
commit 2d079d77f7
2 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -378,7 +378,7 @@ fn extractThread(
///
/// Assumes the inode is a file or ext_file type.
fn extractRegFile(self: Inode, alloc: std.mem.Allocator, archive: *Archive, path: []const u8, options: ExtractionOptions) !void {
var fil = try std.fs.cwd().createFile(path, .{});
var fil = try std.fs.cwd().createFile(path, .{ .exclusive = true });
defer fil.close();
var wrt = fil.writer(&[0]u8{});
var dat_rdr = try self.dataReader(alloc, archive);