Samuel W. Flint пре 5 година
родитељ
комит
1706950728
1 измењених фајлова са 7 додато и 1 уклоњено
  1. 7 1
      src/config.rs

+ 7 - 1
src/config.rs

@@ -66,7 +66,13 @@ pub struct Group {
 
 pub fn find_config_file(original: Option<&str>) -> PathBuf {
     match original {
-        None => return PathBuf::from("~/.sync-it"),
+        None => {
+            if PathBuf::from("~/.config/sync-it/config.toml").exists() {
+                return PathBuf::from("~/.config/sync-it/config.toml");
+            } else {
+                return PathBuf::from("~/.sync-it");
+            }
+        },
         Some(p) => return PathBuf::from(&p),
     }
 }