[][src]Function sccache::dist::pkg::simplify_path

pub fn simplify_path(path: &Path) -> Result<PathBuf>

Simplify a path to one without any relative components, erroring if it looks like there could be any symlink complexity that means a simplified path is not equivalent to the original (see the documentation of fs::canonicalize for an example).

So why avoid resolving symlinks? Any path that we are trying to simplify has (usually) been added to an archive because something will try access it, but resolving symlinks (be they for the actual file or directory components) can make the accessed path 'disappear' in favour of the canonical path.