mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-01-05 12:57:50 +00:00
Try to create parent directory when writing default config (#4295)
Fixes https://github.com/ghostty-org/ghostty/issues/4277
This commit is contained in:
@@ -2695,6 +2695,9 @@ 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);
|
||||
}
|
||||
const file = try std.fs.createFileAbsolute(path, .{});
|
||||
defer file.close();
|
||||
try std.fmt.format(
|
||||
|
||||
Reference in New Issue
Block a user