diff options
| author | David Lönnhager <david.l@mullvad.net> | 2023-02-14 11:58:38 +0100 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2023-02-14 11:59:48 +0100 |
| commit | fc88b9a0782dec70efbe30b2d643e08197360b09 (patch) | |
| tree | 36e18c220c24fdf178346f0ea9f11947d23ac949 | |
| parent | e24e252cd8a25c3651d24856140318f73161f50f (diff) | |
| download | mullvadvpn-fc88b9a0782dec70efbe30b2d643e08197360b09.tar.xz mullvadvpn-fc88b9a0782dec70efbe30b2d643e08197360b09.zip | |
Don't fail if one of the directories cannot be obtained in the help text for mullvad-daemon
| -rw-r--r-- | mullvad-daemon/src/cli.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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()); } |
