fix(path): use /home/freddy/.cache as runtime directory to avoid loosing kvs store data on reboot

This commit is contained in:
Federico Terzi 2021-07-30 20:06:15 +02:00
parent 93a7caa101
commit 32775d414c

View File

@ -230,11 +230,7 @@ fn get_default_runtime_dir() -> Option<PathBuf> {
} }
fn get_default_runtime_path() -> PathBuf { fn get_default_runtime_path() -> PathBuf {
let runtime_dir = if cfg!(target_os = "linux") { let runtime_dir = dirs::cache_dir().expect("unable to obtain dirs::cache_dir()");
dirs::runtime_dir().expect("unable to obtain dirs::runtime_dir()")
} else {
dirs::cache_dir().expect("unable to obtain dirs::cache_dir()")
};
runtime_dir.join("espanso") runtime_dir.join("espanso")
} }