Merge branch 'master' into zig-0.15.0

This commit is contained in:
CJ van den Berg 2025-07-15 18:41:19 +02:00
commit 724dc9200d
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
2 changed files with 4 additions and 2 deletions

View file

@ -1341,6 +1341,8 @@ pub fn store_to_existing_file_const(self: *const Self, file_path: []const u8) St
}
pub fn store_to_new_file_const(self: *const Self, file_path: []const u8) StoreToFileError!void {
if (std.fs.path.dirname(file_path)) |dir_name|
try cwd().makePath(dir_name);
const file = try cwd().createFile(file_path, .{ .read = true, .truncate = true });
defer file.close();
try self.store_to_file_const(file);