From 32775d414c1f0b163041e71f68ef0d93a95b08ac Mon Sep 17 00:00:00 2001 From: Federico Terzi Date: Fri, 30 Jul 2021 20:06:15 +0200 Subject: [PATCH] fix(path): use /home/freddy/.cache as runtime directory to avoid loosing kvs store data on reboot --- espanso-path/src/lib.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/espanso-path/src/lib.rs b/espanso-path/src/lib.rs index 5961357..fca4c46 100644 --- a/espanso-path/src/lib.rs +++ b/espanso-path/src/lib.rs @@ -230,11 +230,7 @@ fn get_default_runtime_dir() -> Option { } fn get_default_runtime_path() -> PathBuf { - let runtime_dir = if cfg!(target_os = "linux") { - dirs::runtime_dir().expect("unable to obtain dirs::runtime_dir()") - } else { - dirs::cache_dir().expect("unable to obtain dirs::cache_dir()") - }; + let runtime_dir = dirs::cache_dir().expect("unable to obtain dirs::cache_dir()"); runtime_dir.join("espanso") }