path-absolutize
path-absolutize copied to clipboard
absolutize_from panics if the path goes outside of root
there is a need for normalizing a relative path, so it can even result in sth like "../a/"
#[test]
#[should_panic]
fn test_path_evaluating_to_outside_of_root_panics() {
let path = Path::new("..");
let new_path = path.absolutize_from("");
}
The path that pass to the absolutize_from function should be absolute.