uv
c43757ad - Avoid calling `normalize_path` with relative paths that extend beyond the current directory (#3013)

Commit
2 years ago
Avoid calling `normalize_path` with relative paths that extend beyond the current directory (#3013) ## Summary It turns out that `normalize_path` (sourced from Cargo) has a subtle bug. If you pass it a relative path that traverses beyond the root, it silently drops components. So, e.g., passing `../foo/bar`, it will just drop the leading `..` and return `foo/bar`. This PR encodes that behavior as a `Result` and avoids using it in such cases. Closes https://github.com/astral-sh/uv/issues/3012.
Author
Parents
Loading