internal: Enforce utf8 paths

This commit is contained in:
Lukas Wirth 2024-03-19 13:05:50 +01:00
parent ba339596bf
commit 399dbc074b
46 changed files with 383 additions and 319 deletions

View file

@ -326,7 +326,7 @@ impl VirtualPath {
}
fn strip_prefix(&self, base: &VirtualPath) -> Option<&RelPath> {
<_ as AsRef<std::path::Path>>::as_ref(&self.0)
<_ as AsRef<paths::Utf8Path>>::as_ref(&self.0)
.strip_prefix(&base.0)
.ok()
.map(RelPath::new_unchecked)