snix_eval/value/
path.rs

1use path_clean::PathClean;
2use std::path::PathBuf;
3
4/// This function should match the behavior of canonPath() in
5/// src/libutil/util.cc of cppnix.  Currently it does not match that
6/// behavior; it uses the `path_clean` library which is based on the
7/// Go standard library
8// TODO: make this match the behavior of cppnix
9// TODO: write tests for this
10pub fn canon_path(path: PathBuf) -> PathBuf {
11    path.clean()
12}