[−][src]Function broot::path::normalize_path
pub fn normalize_path<P: AsRef<Path>>(path: P) -> PathBuf
Improve the path to try remove and solve .. token.
This assumes that a/b/../c
is a/c
which might be different from
what the OS would have chosen when b is a link. This is OK
for broot verb arguments but can't be generally used elsewhere
(a more general solution would probably query the FS and just
resolve b in case of links).
This function ensures a given path ending with '/' still ends with '/' after normalization.