Skip to main content

contained_path

Function contained_path 

Source
pub fn contained_path(bundle_dir: &Path, path: &Path) -> Option<PathBuf>
Expand description

Resolve a bundle file to its canonical path, requiring the target to stay inside the bundle after following symlinks. The lexical check above rejects .. and absolute components, but a plain-looking name can still be a symlink pointing outside the bundle.