Skip to main content

normalize_under_root

Function normalize_under_root 

Source
pub fn normalize_under_root(root: &Path, candidate: &Path) -> Result<PathBuf>
Expand description

Normalise a user-supplied path so it stays under root. Rejects absolute inputs and any traversal that would escape root.