Skip to content

Commit

Permalink
Use dunce crate to get non-UNC paths when calling canonicalize
Browse files Browse the repository at this point in the history
  • Loading branch information
ericswanson-dfinity committed Jan 12, 2024
1 parent 07fde6c commit 5ed4723
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/dfx-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ candid = { workspace = true, features = ["random"] }
clap = { workspace = true, features = ["string"] }
dialoguer = "0.10.0"
directories-next.workspace = true
dunce = "1.0"
flate2 = { workspace = true, default-features = false, features = ["zlib-ng"] }
hex = { workspace = true, features = ["serde"] }
humantime-serde = "1.1.1"
Expand Down
2 changes: 1 addition & 1 deletion src/dfx-core/src/fs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::fs::{Metadata, Permissions, ReadDir};
use std::path::{Path, PathBuf};

pub fn canonicalize(path: &Path) -> Result<PathBuf, FsError> {
path.canonicalize()
dunce::canonicalize(path)
.map_err(|err| FsError::new(CanonicalizePathFailed(path.to_path_buf(), err)))
}

Expand Down

0 comments on commit 5ed4723

Please sign in to comment.