Skip to main content

validate_root_in

Function validate_root_in 

Source
pub fn validate_root_in(root: &Path, cwd: &Path) -> Result<PathBuf, String>
Expand description

Validate root as validate_root does, with cwd as the start of a relative root.

A relative root is also checked with the spelling of the current directory from the PWD variable, when PWD names cwd. The current directory that the process gets is already resolved, so a shell that changed into a linked directory leaves the link only in PWD. An absolute root is checked only as given.

ยงErrors

Returns a message as validate_root does.