-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Use dunce crate to get non-UNC paths when calling canonicalize (#…
…3502) Call `dunce::canonicalize` rather than `Path::canonicalize`. On Linux/Macos, this just calls `std::fs::canonicalize()`, so no change there. PathBuf::canonicalize on Windows generally returns Windows NT UNC paths like `\\?\C:\Users\you\`. Lots of programs, including Microsoft's, don't work with these kinds of paths. For example, `npm` will print out a message something like `The current working directory is a UNC path. I'm going to use C:\Windows instead.`. dunce: > ... converts paths to legacy format whenever possible, but leaves UNC paths as-is when they can’t be unambiguously expressed in a simpler way. This allows legacy programs to access all paths they can possibly access, and UNC-aware programs to access all paths. rust-lang/rust#42869 (comment) Part of https://dfinity.atlassian.net/browse/SDK-1343
- Loading branch information
1 parent
4aa1c83
commit 2fcc47b
Showing
7 changed files
with
14 additions
and
15 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters