fix: use correct system directories for configs and packages
This commit is contained in:
parent
7d3a01784b
commit
a4146d2402
|
@ -361,13 +361,13 @@ impl ConfigSet {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_default_config_dir() -> PathBuf {
|
pub fn get_default_config_dir() -> PathBuf {
|
||||||
let home_dir = dirs::home_dir().expect("Unable to get home directory");
|
let config_dir = dirs::config_dir().expect("Unable to get config directory");
|
||||||
home_dir.join(".espanso")
|
config_dir.join("espanso")
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_default_packages_dir() -> PathBuf {
|
pub fn get_default_packages_dir() -> PathBuf {
|
||||||
let espanso_dir = ConfigSet::get_default_config_dir();
|
let data_dir = dirs::data_local_dir().expect("Unable to get data directory");
|
||||||
espanso_dir.join(PACKAGES_FOLDER_NAME)
|
data_dir.join(PACKAGES_FOLDER_NAME)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user