Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
fix: Normalize filesystem paths with `dunce`
Merged lorenz opened 8 months ago

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!

lorenz opened with revision 8826eece on base a670b6e6 +18 -10 8 months ago

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!

did:key:z6MkwcUR...q1kL accepted 8 months ago

Looks good to me

fintohaps pushed revision 2 eaf7e669 on base 31039bbc +18 -10 8 months ago

Rebased

fintohaps merged revision eaf7e669 at 5229fb8a 8 months ago