config: only create template file is prior was not found

pull/9192/head
Mitchell Hashimoto 2025-10-13 14:27:38 -07:00
parent 14b441be1e
commit 5462553741
No known key found for this signature in database
GPG Key ID: 523D5DC389D273BC
1 changed files with 2 additions and 2 deletions

View File

@ -3509,13 +3509,13 @@ pub fn loadDefaultFiles(self: *Config, alloc: Allocator) !void {
// If both files are not found, then we create a template file.
// For macOS, we only create the template file in the app support
if (app_support_loaded and xdg_loaded) {
if (!app_support_loaded and !xdg_loaded) {
writeConfigTemplate(app_support_path) catch |err| {
log.warn("error creating template config file err={}", .{err});
};
}
} else {
if (xdg_loaded) {
if (!xdg_loaded) {
writeConfigTemplate(xdg_path) catch |err| {
log.warn("error creating template config file err={}", .{err});
};