fix: Normalize filesystem paths with `dunce`
Microsoft Windows has Universal Naming Convention (UNC) paths, see https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats#unc-paths
The Rust standard library normalizes paths to this form when calling
std::fs::canonicalize, see
https://doc.rust-lang.org/std/fs/fn.canonicalize.html
However, some programs, do not parse these paths correctly, including
our ally git:
$ git clone \\?\C:\Users\lorenz\tmp
Cloning into 'tmp'...
ssh: Could not resolve hostname \\\\?\\c: No such host is known.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
The dunce crate solves the problem of having to deal with
normalization and avoiding weird UNC paths for us. Note that on
non-Windows platforms, it behaves exactly like
std::fs::canonicalize!
9 files changed
+18
-10
31039bbc
→
5229fb8a
modified Cargo.lock
@@ -759,6 +759,12 @@ dependencies = [
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -2662,6 +2668,7 @@ dependencies = [
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -2698,6 +2705,7 @@ version = "0.15.0"
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -2901,6 +2909,7 @@ dependencies = [
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified Cargo.toml
@@ -27,6 +27,7 @@ chrono = { version = "0.4.26", default-features = false }
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified crates/radicle-cli/Cargo.toml
@@ -16,6 +16,7 @@ path = "src/main.rs"
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified crates/radicle-cli/src/commands/init.rs
@@ -212,10 +212,7 @@ pub fn init(
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| + | |
|
|
|
|
|
modified crates/radicle-remote-helper/Cargo.toml
@@ -14,6 +14,7 @@ name = "git-remote-rad"
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified crates/radicle-remote-helper/src/lib.rs
@@ -162,7 +162,7 @@ pub fn run(profile: radicle::Profile) -> Result<(), Error> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified crates/radicle/Cargo.toml
@@ -22,6 +22,7 @@ chrono = { workspace = true, features = ["clock"], optional = true }
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified crates/radicle/src/profile.rs
@@ -541,7 +541,7 @@ impl Home {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified crates/radicle/src/rad.rs
@@ -127,7 +127,7 @@ where
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -295,9 +295,7 @@ pub fn checkout<P: AsRef<Path>, S: storage::ReadStorage>(
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
|
|
|
|
|