From f98ab3dffde27e3385922b65d443a209dbe53136 Mon Sep 17 00:00:00 2001 From: Federico Terzi Date: Wed, 2 Jun 2021 11:48:58 +0200 Subject: [PATCH] fix(path): change wrong package resolution order --- espanso-path/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/espanso-path/src/lib.rs b/espanso-path/src/lib.rs index d42b577..dc2991f 100644 --- a/espanso-path/src/lib.rs +++ b/espanso-path/src/lib.rs @@ -234,15 +234,15 @@ fn get_default_runtime_path() -> PathBuf { } fn get_packages_dir(config_dir: &Path, legacy_data_dir: &Path) -> Option { - if let Some(packages_dir) = get_legacy_embedded_packages_dir(config_dir) { + if let Some(packages_dir) = get_default_packages_dir(config_dir) { + debug!("detected default packages dir: {:?}", packages_dir); + Some(packages_dir) + } else if let Some(packages_dir) = get_legacy_embedded_packages_dir(config_dir) { debug!("detected legacy packages dir: {:?}", packages_dir); Some(packages_dir) } else if let Some(packages_dir) = get_legacy_packages_dir(legacy_data_dir) { debug!("detected legacy packages dir: {:?}", packages_dir); Some(packages_dir) - } else if let Some(packages_dir) = get_default_packages_dir(config_dir) { - debug!("detected default packages dir: {:?}", packages_dir); - Some(packages_dir) } else { None }