summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2023-02-14 13:31:31 +0100
committerDavid Lönnhager <david.l@mullvad.net>2023-02-14 13:31:31 +0100
commitbd399abf090c7a062e4d48073018e6ea1a9ce928 (patch)
tree9be704924bad08fb31147d58453867a11d1acf5e
parente24e252cd8a25c3651d24856140318f73161f50f (diff)
parenta97e619331198edfd94295d58c9d7bb293ac985b (diff)
downloadmullvadvpn-bd399abf090c7a062e4d48073018e6ea1a9ce928.tar.xz
mullvadvpn-bd399abf090c7a062e4d48073018e6ea1a9ce928.zip
Merge branch 'daemon-cli-tolerate-missing-help-paths'
-rw-r--r--CHANGELOG.md3
-rw-r--r--mullvad-daemon/src/cli.rs6
2 files changed, 6 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 07d53e86dc..18591eb518 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -43,6 +43,9 @@ Line wrap the file at 100 chars. Th
#### Android
- Fix adaptive app icon which previously had a displaced nose and some other oddities.
+#### Windows
+- Don't fail to show the mullvad-daemon help text if some of the default paths cannot be obtained.
+
## [2023.1-beta2] - 2023-02-06
### Fixed
diff --git a/mullvad-daemon/src/cli.rs b/mullvad-daemon/src/cli.rs
index ad9c5d233b..59223cbc17 100644
--- a/mullvad-daemon/src/cli.rs
+++ b/mullvad-daemon/src/cli.rs
@@ -68,9 +68,9 @@ lazy_static::lazy_static! {
",
mullvad_paths::get_default_resource_dir().display(),
- mullvad_paths::get_default_settings_dir().expect("Unable to get settings dir").display(),
- mullvad_paths::get_default_cache_dir().expect("Unable to get cache dir").display(),
- mullvad_paths::get_default_log_dir().expect("Unable to get log dir").display(),
+ mullvad_paths::get_default_settings_dir().map(|dir| dir.display().to_string()).unwrap_or_else(|_| "N/A".to_string()),
+ mullvad_paths::get_default_cache_dir().map(|dir| dir.display().to_string()).unwrap_or_else(|_| "N/A".to_string()),
+ mullvad_paths::get_default_log_dir().map(|dir| dir.display().to_string()).unwrap_or_else(|_| "N/A".to_string()),
mullvad_paths::get_default_rpc_socket_path().display());
}