Skip to main content

resolve_entry_path

Function resolve_entry_path 

Source
pub fn resolve_entry_path(raw: &str) -> Result<PathBuf, String>
Expand description

The path a mutation acts on: the request path with its PARENT canonicalized and its own last component kept as given.

Canonicalizing the whole path would resolve a final symlink to its target, and a rename or delete would then act on the target instead of the link. Canonicalizing the parent still resolves .., ~ and any linked folder above it, so protection checks see where the entry really is.