Skip to main content

sanitize_relative_path

Function sanitize_relative_path 

Source
fn sanitize_relative_path(path: &Path) -> PathBuf
Expand description

Normalizes an untrusted path relative to the source root, discarding leading separators, drive prefixes, and parent components that would escape that root.