From a4146d240268622b2e54d01a4659bb0613d11ab6 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Tue, 8 Oct 2019 18:05:30 +0200 Subject: [PATCH] fix: use correct system directories for configs and packages --- src/config/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/config/mod.rs b/src/config/mod.rs index ce1f192..4783d15 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -361,13 +361,13 @@ impl ConfigSet { } pub fn get_default_config_dir() -> PathBuf { - let home_dir = dirs::home_dir().expect("Unable to get home directory"); - home_dir.join(".espanso") + let config_dir = dirs::config_dir().expect("Unable to get config directory"); + config_dir.join("espanso") } pub fn get_default_packages_dir() -> PathBuf { - let espanso_dir = ConfigSet::get_default_config_dir(); - espanso_dir.join(PACKAGES_FOLDER_NAME) + let data_dir = dirs::data_local_dir().expect("Unable to get data directory"); + data_dir.join(PACKAGES_FOLDER_NAME) } }