diff options
| author | David Lönnhager <david.l@mullvad.net> | 2021-01-08 16:32:31 +0100 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2021-01-12 16:10:21 +0100 |
| commit | 00885edcf042d4ae45eed26c2f5c2c67bc5de9ec (patch) | |
| tree | c9dcf02bfc652d32ac90ecefb3dc452975699141 /mullvad-setup/src | |
| parent | 12ca4a60bf3455132aed849ad8d5df87cd919d35 (diff) | |
| download | mullvadvpn-00885edcf042d4ae45eed26c2f5c2c67bc5de9ec.tar.xz mullvadvpn-00885edcf042d4ae45eed26c2f5c2c67bc5de9ec.zip | |
Replace the old cache directory
Diffstat (limited to 'mullvad-setup/src')
| -rw-r--r-- | mullvad-setup/src/main.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mullvad-setup/src/main.rs b/mullvad-setup/src/main.rs index c5ed2d38f0..0e9c104db1 100644 --- a/mullvad-setup/src/main.rs +++ b/mullvad-setup/src/main.rs @@ -152,12 +152,12 @@ async fn reset_firewall() -> Result<(), Error> { } async fn clear_history() -> Result<(), Error> { - let (user_cache_path, settings_path) = get_paths()?; + let (cache_path, settings_path) = get_paths()?; let mut rpc_runtime = MullvadRpcRuntime::with_cache( tokio::runtime::Handle::current(), None, - &user_cache_path, + &cache_path, false, |_| Ok(()), ) @@ -165,7 +165,7 @@ async fn clear_history() -> Result<(), Error> { .map_err(Error::RpcInitializationError)?; let mut account_history = account_history::AccountHistory::new( - &user_cache_path, + &cache_path, &settings_path, rpc_runtime.mullvad_rest_handle(), ) @@ -180,15 +180,15 @@ async fn clear_history() -> Result<(), Error> { #[cfg(not(windows))] fn get_paths() -> Result<(PathBuf, PathBuf), Error> { - let user_cache_path = mullvad_paths::user_cache_dir().map_err(Error::CachePathError)?; + let cache_path = mullvad_paths::cache_dir().map_err(Error::CachePathError)?; let settings_path = mullvad_paths::settings_dir().map_err(Error::SettingsPathError)?; - Ok((user_cache_path, settings_path)) + Ok((cache_path, settings_path)) } #[cfg(windows)] fn get_paths() -> Result<(PathBuf, PathBuf), Error> { - let user_cache_path = mullvad_paths::user_cache_dir().map_err(Error::CachePathError)?; + let cache_path = mullvad_paths::cache_dir().map_err(Error::CachePathError)?; let settings_path = daemon_paths::get_mullvad_daemon_settings_path().map_err(Error::SettingsPathError)?; - Ok((user_cache_path, settings_path)) + Ok((cache_path, settings_path)) } |
