Skip to main content

assert_within

Function assert_within 

Source
pub fn assert_within(dir: &Path, path: &Path) -> Result<()>
Expand description

Final gate before we open anything: the resolved path must sit directly in the intended directory. Defends against a .. that slipped through and against symlinked parents.