Simplify adding htracker to XDG_DATA_HOME path.

This commit is contained in:
Nicolás A. Ortega Froysa 2022-07-08 17:49:58 +02:00
parent 2149821ebd
commit 2fbd97a622

View File

@ -74,7 +74,7 @@ fn main()
let mut hmgr = HabitMgr::new(); let mut hmgr = HabitMgr::new();
let data_dir:PathBuf = match env::var("XDG_DATA_HOME") { let data_dir:PathBuf = match env::var("XDG_DATA_HOME") {
Ok(s) => [ s, "htracker".to_string() ].iter().collect(), Ok(s) => PathBuf::from(s).join("htracker"),
Err(_e) => PathBuf::from("./"), Err(_e) => PathBuf::from("./"),
}; };