diff options
Diffstat (limited to 'tvix/eval/src/value/path.rs')
-rw-r--r-- | tvix/eval/src/value/path.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tvix/eval/src/value/path.rs b/tvix/eval/src/value/path.rs new file mode 100644 index 000000000000..ad526a8746f8 --- /dev/null +++ b/tvix/eval/src/value/path.rs @@ -0,0 +1,14 @@ +use path_clean::PathClean; +use std::path::PathBuf; + +/// This function should match the behavior of canonPath() in +/// src/libutil/util.cc of cppnix. Currently it does not match that +/// behavior; it uses the `path_clean` library which is based on the +/// Go standard library +/// +/// TODO: make this match the behavior of cppnix +/// TODO: write tests for this + +pub fn canon_path(path: PathBuf) -> PathBuf { + path.clean() +} |