fix: don't try to create a default config at path that exists

Currently this bug has no actual consequences, we just continue silently
on AlreadyExists in main()
(this line: https://github.com/YaLTeR/niri/blob/e9c6f08906143c3fec1ad1301d538bef4cbc1978/src/main.rs#L151).

This commit just eliminates the redundant attempt.
This commit is contained in:
James Sully
2025-05-09 10:08:29 +10:00
committed by Ivan Molodetskikh
parent e9c6f08906
commit ea7add3563
+1 -1
View File
@@ -355,7 +355,7 @@ fn config_path(cli_path: Option<PathBuf>) -> (PathBuf, PathBuf, bool) {
let system_path = system_config_path();
if let Some(path) = default_config_path() {
if path.exists() {
return (path.clone(), path, true);
return (path.clone(), path, false);
}
if system_path.exists() {