mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Avoid canonicalizing executables on Windows (#5446)
## Summary If you have an executable path on a network share path (like `\\some-host\some-share\...\python.exe`), canonicalizing it adds the `\\?` prefix, but dunce cannot safely strip it. This PR changes the Windows logic to avoid canonicalizing altogether. We don't really expect symlinks on Windows, so it seems unimportant to resolve them. Closes: https://github.com/astral-sh/uv/issues/5440.
This commit is contained in:
parent
967fcdbb83
commit
8b8f34ac21
4 changed files with 26 additions and 125 deletions
|
@ -15,7 +15,7 @@ pub struct Timestamp(std::time::SystemTime);
|
|||
impl Timestamp {
|
||||
/// Return the [`Timestamp`] for the given path.
|
||||
pub fn from_path(path: impl AsRef<Path>) -> std::io::Result<Self> {
|
||||
let metadata = path.as_ref().metadata()?;
|
||||
let metadata = fs_err::metadata(path.as_ref())?;
|
||||
Ok(Self::from_metadata(&metadata))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue