aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorJames Sully <sullyj3@gmail.com>2025-05-09 10:08:29 +1000
committerIvan Molodetskikh <yalterz@gmail.com>2025-05-08 21:52:39 -0700
commitea7add35631630b7fe718d970d189ee6ce1a33f0 (patch)
tree378404189db6161516c748724eff29bf9d215271 /src/main.rs
parente9c6f08906143c3fec1ad1301d538bef4cbc1978 (diff)
downloadniri-ea7add35631630b7fe718d970d189ee6ce1a33f0.tar.gz
niri-ea7add35631630b7fe718d970d189ee6ce1a33f0.tar.bz2
niri-ea7add35631630b7fe718d970d189ee6ce1a33f0.zip
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.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 3281d19b..018f8d3f 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -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() {