forge
Explore
Log in

Don't you dare go Hollow

Don't try to create a default config at path that exists

Browse files at this commit

ea7add35631630b7fe718d970d189ee6ce1a33f0James SullyParent: e9c6f08
  • fix
    • don't try to create a default config at path that exists
Show full message
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.
src/main.rsmodified+1 -1
@@ -355,7 +355,7 @@ fn config_path(cli_path: Option<PathBuf>) -> (PathBuf, PathBuf, bool) {
355 let system_path = system_config_path();355 let system_path = system_config_path();
356 if let Some(path) = default_config_path() {356 if let Some(path) = default_config_path() {
357 if path.exists() {357 if path.exists() {
358- return (path.clone(), path, true);358+ return (path.clone(), path, false);
359 }359 }
360 360
361 if system_path.exists() {361 if system_path.exists() {