fix_path

Function fix_path 

Source
pub fn fix_path(path: &str, prefix: &str) -> Result<String, TarCopyError>
Expand description

Fix and normalize a path by removing a prefix and checking for directory traversal.

Matches Go’s fixPath: strips prefix, cleans, strips leading separators, then checks for remaining .. components.

Returns an empty string if the cleaned path is empty or equals root. Returns an error if the path contains .. after cleaning.