diff options
| author | David Lönnhager <david.l@mullvad.net> | 2023-02-14 13:31:31 +0100 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2023-02-14 13:31:31 +0100 |
| commit | bd399abf090c7a062e4d48073018e6ea1a9ce928 (patch) | |
| tree | 9be704924bad08fb31147d58453867a11d1acf5e | |
| parent | e24e252cd8a25c3651d24856140318f73161f50f (diff) | |
| parent | a97e619331198edfd94295d58c9d7bb293ac985b (diff) | |
| download | mullvadvpn-bd399abf090c7a062e4d48073018e6ea1a9ce928.tar.xz mullvadvpn-bd399abf090c7a062e4d48073018e6ea1a9ce928.zip | |
Merge branch 'daemon-cli-tolerate-missing-help-paths'
| -rw-r--r-- | CHANGELOG.md | 3 | ||||
| -rw-r--r-- | mullvad-daemon/src/cli.rs | 6 |
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()); } |
