diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2023-08-01 15:57:13 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2023-08-01 15:57:13 +0200 |
| commit | 7ed1a287974859b588381a3f707e80c318eded2f (patch) | |
| tree | 39efb1ed2c0ede0084335a777981f7d7f9b6a7e9 | |
| parent | 0312e6a09a715ec554749972dce7670ac208f4c4 (diff) | |
| parent | 5f81059b8435bcdd4639434af77bfd0fba725561 (diff) | |
| download | mullvadvpn-7ed1a287974859b588381a3f707e80c318eded2f.tar.xz mullvadvpn-7ed1a287974859b588381a3f707e80c318eded2f.zip | |
Merge branch 'replace-dirs-next'
| -rw-r--r-- | Cargo.lock | 28 | ||||
| -rw-r--r-- | mullvad-daemon/Cargo.toml | 2 | ||||
| -rw-r--r-- | mullvad-daemon/src/migrations/mod.rs | 2 | ||||
| -rw-r--r-- | mullvad-problem-report/Cargo.toml | 2 | ||||
| -rw-r--r-- | mullvad-problem-report/src/lib.rs | 6 |
5 files changed, 23 insertions, 17 deletions
diff --git a/Cargo.lock b/Cargo.lock index 43ca55d88f..005ae04ef3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -871,24 +871,24 @@ dependencies = [ ] [[package]] -name = "dirs-next" -version = "2.0.0" +name = "dirs" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" dependencies = [ - "cfg-if", - "dirs-sys-next", + "dirs-sys", ] [[package]] -name = "dirs-sys-next" -version = "0.1.2" +name = "dirs-sys" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" dependencies = [ "libc", + "option-ext", "redox_users", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -2004,7 +2004,7 @@ dependencies = [ "chrono", "clap", "ctrlc", - "dirs-next", + "dirs", "duct", "err-derive", "fern", @@ -2132,7 +2132,7 @@ name = "mullvad-problem-report" version = "0.0.0" dependencies = [ "clap", - "dirs-next", + "dirs", "duct", "env_logger 0.10.0", "err-derive", @@ -2462,6 +2462,12 @@ dependencies = [ ] [[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] name = "os_pipe" version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" diff --git a/mullvad-daemon/Cargo.toml b/mullvad-daemon/Cargo.toml index 2083336ac6..8b27a6c526 100644 --- a/mullvad-daemon/Cargo.toml +++ b/mullvad-daemon/Cargo.toml @@ -65,7 +65,7 @@ ctrlc = "3.0" duct = "0.13" windows-service = "0.6.0" winapi = { version = "0.3", features = ["winnt", "excpt"] } -dirs-next = "2.0" +dirs = "5.0.1" [target.'cfg(windows)'.dependencies.windows-sys] version = "0.45.0" diff --git a/mullvad-daemon/src/migrations/mod.rs b/mullvad-daemon/src/migrations/mod.rs index 8cf7b4a636..69d384956c 100644 --- a/mullvad-daemon/src/migrations/mod.rs +++ b/mullvad-daemon/src/migrations/mod.rs @@ -235,7 +235,7 @@ mod windows { pub async fn migrate_after_windows_update( destination_settings_dir: &Path, ) -> Result<bool, Error> { - let system_appdata_dir = dirs_next::data_local_dir().ok_or(Error::FindAppData)?; + let system_appdata_dir = dirs::data_local_dir().ok_or(Error::FindAppData)?; if !destination_settings_dir.starts_with(system_appdata_dir) { return Ok(false); } diff --git a/mullvad-problem-report/Cargo.toml b/mullvad-problem-report/Cargo.toml index c73f260da2..3d92cb868c 100644 --- a/mullvad-problem-report/Cargo.toml +++ b/mullvad-problem-report/Cargo.toml @@ -9,7 +9,7 @@ edition.workspace = true publish.workspace = true [dependencies] -dirs-next = "2.0" +dirs = "5.0.1" err-derive = "0.3.1" lazy_static = "1.0" log = "0.4" diff --git a/mullvad-problem-report/src/lib.rs b/mullvad-problem-report/src/lib.rs index 088ceb27df..9cff4ce9fa 100644 --- a/mullvad-problem-report/src/lib.rs +++ b/mullvad-problem-report/src/lib.rs @@ -213,7 +213,7 @@ fn frontend_log_dir() -> Option<Result<PathBuf, LogError>> { #[cfg(target_os = "linux")] { Some( - dirs_next::home_dir() + dirs::home_dir() .ok_or(LogError::NoHomeDir) .map(|home_dir| home_dir.join(".config/Mullvad VPN/logs")), ) @@ -221,7 +221,7 @@ fn frontend_log_dir() -> Option<Result<PathBuf, LogError>> { #[cfg(target_os = "macos")] { Some( - dirs_next::home_dir() + dirs::home_dir() .ok_or(LogError::NoHomeDir) .map(|home_dir| home_dir.join("Library/Logs/Mullvad VPN")), ) @@ -420,7 +420,7 @@ impl ProblemReport { } fn redact_home_dir(input: &str) -> Cow<'_, str> { - redact_home_dir_inner(input, dirs_next::home_dir()) + redact_home_dir_inner(input, dirs::home_dir()) } fn redact_network_info(input: &str) -> Cow<'_, str> { |
