From 5abf2419e1b1f19ab2d634af8db58fd9beb0d57d Mon Sep 17 00:00:00 2001 From: Federico Terzi Date: Sun, 27 Jun 2021 15:45:40 +0200 Subject: [PATCH] feat(path): include portable mode flag --- espanso-path/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/espanso-path/src/lib.rs b/espanso-path/src/lib.rs index dc2991f..6f16841 100644 --- a/espanso-path/src/lib.rs +++ b/espanso-path/src/lib.rs @@ -28,6 +28,8 @@ pub struct Paths { pub config: PathBuf, pub runtime: PathBuf, pub packages: PathBuf, + + pub is_portable_mode: bool, } pub fn resolve_paths( @@ -75,10 +77,13 @@ pub fn resolve_paths( packages_dir }; + let is_portable_mode = is_portable_mode() && force_config_dir.is_none() && force_runtime_dir.is_none(); + Paths { config: config_dir, runtime: runtime_dir, packages: packages_dir, + is_portable_mode, } }