fix: file creation when directory already exists
parent
f97518cc10
commit
315b54822a
|
|
@ -3351,7 +3351,7 @@ pub fn loadOptionalFile(
|
|||
fn writeConfigTemplate(path: []const u8) !void {
|
||||
log.info("creating template config file: path={s}", .{path});
|
||||
if (std.fs.path.dirname(path)) |dir_path| {
|
||||
try std.fs.makeDirAbsolute(dir_path);
|
||||
try std.fs.cwd().makePath(dir_path);
|
||||
}
|
||||
const file = try std.fs.createFileAbsolute(path, .{});
|
||||
defer file.close();
|
||||
|
|
|
|||
Loading…
Reference in New Issue