unescape_to_path_canonical

Function unescape_to_path_canonical 

Source
fn unescape_to_path_canonical(s: &str) -> Result<Cow<'_, Path>>
Expand description

Like unescape_to_path, but also ensures the path is in “canonical” form; this has the same semantics as Rust https://doc.rust-lang.org/std/path/struct.Path.html#method.components which in particular removes . and extra //.

We also deny uplinks .. and empty paths.