From ad0708a1862b908448cbbbdc67b416565a89d3f3 Mon Sep 17 00:00:00 2001 From: iho Date: Wed, 11 Oct 2023 23:40:10 +0300 Subject: [PATCH] Add comments --- cargo-near/src/util/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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()),