summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--mullvad-paths/src/resources.rs29
1 files changed, 18 insertions, 11 deletions
diff --git a/mullvad-paths/src/resources.rs b/mullvad-paths/src/resources.rs
index 6b8e1383af..2ae2e5e2b6 100644
--- a/mullvad-paths/src/resources.rs
+++ b/mullvad-paths/src/resources.rs
@@ -10,19 +10,26 @@ pub fn get_resource_dir() -> PathBuf {
}
pub fn get_default_resource_dir() -> PathBuf {
- match env::current_exe() {
- Ok(mut path) => {
- path.pop();
- path
- }
- Err(e) => {
- log::error!(
- "Failed finding the install directory. Using working directory: {}",
- e
- );
- PathBuf::from(".")
+ #[cfg(not(target_os = "android"))]
+ {
+ match env::current_exe() {
+ Ok(mut path) => {
+ path.pop();
+ path
+ }
+ Err(e) => {
+ log::error!(
+ "Failed finding the install directory. Using working directory: {}",
+ e
+ );
+ PathBuf::from(".")
+ }
}
}
+ #[cfg(target_os = "android")]
+ {
+ PathBuf::from(crate::APP_PATH)
+ }
}
pub fn get_api_ca_path() -> PathBuf {