diff --git a/cargo-near/src/util/mod.rs b/cargo-near/src/util/mod.rs index 3b421873..bbf0f76e 100644 --- a/cargo-near/src/util/mod.rs +++ b/cargo-near/src/util/mod.rs @@ -243,7 +243,9 @@ pub(crate) fn compile_project( /// Create the directory if it doesn't exist, and return the absolute path to it. pub(crate) fn force_canonicalize_dir(dir: &Utf8Path) -> color_eyre::eyre::Result { fs::create_dir_all(dir).wrap_err_with(|| format!("failed to create directory `{}`", dir))?; - // use `dunce` create instead of default one because it's compatible with Windows + // use `dunce` create instead of default one because it's compatible with Windows UNC paths + // and don't breake cargo compilation on Windows + // https://github.com/rust-lang/rust/issues/42869 let compatible_path = dunce::canonicalize(&dir); match compatible_path { Ok(path) => Ok(Utf8PathBuf::from_path_buf(path).unwrap()),