ITADN

Canonicalization of `RelativePath`s should be delayed until they are used by `AbsolutePath`s

#336Closedabertelrud 创建于 2022-07-05
A
abertelrudcommented
`RelativePath` today does simple syntactic normalization on non-Windows platforms, eliding path components that are empty or consist of just `.`, and using `..` components to remove parent components, etc. On Windows, `RelativePath` today instead calls `PathCanonicalizeW()`. But in general it isn't possible to canonicalize relative paths — the canonicalization needs to be applied to a resulting `AbsolutePath`, so that the place where an absolute and relative path are joined is canonicalized properly. So we should change the logic to: - have `RelativePath` not try to canonicalize relative paths in isolation - instead have `AbsoluePath` canonicalize the resulting absolute path once it has been formed from the absolute and relative components
关闭于 2023-09-19 2 条评论