Skip to main content

resolve_path

Function resolve_path 

Source
pub(super) fn resolve_path(
    work_dir: &Path,
    relative: &str,
) -> Result<PathBuf, String>
Expand description

Resolve a relative path against work_dir, rejecting traversal attempts.

  • Absolute paths are rejected.
  • .. components that would escape work_dir are rejected.