Skip to main content

normalise

Function normalise 

Source
pub fn normalise(path: &Path) -> String
Expand description

A path as a grant resource writes it: forward slashes, no trailing one.

Backslashes matter. A resource pattern is split on /, so a Windows path left as D:\work\** is a single segment containing a *, which falls outside the decidable fragment and makes every containment question Unknown — and Unknown is a refusal. Normalising here is what keeps the same grant decidable on every platform.