Filter out paths with misplaced colons

This commit is contained in:
mtkennerly 2024-04-22 09:04:25 -04:00
parent e097ad230c
commit 46caca47df
No known key found for this signature in database
GPG key ID: E764BE00BE6E6408
3 changed files with 12 additions and 70 deletions

View file

@ -117,6 +117,11 @@ fn too_broad(path: &str) -> bool {
return true;
}
// Colon not for a drive letter
if path.get(2..).is_some_and(|path| path.contains(':')) {
return true;
}
// Root:
if path == "/" {
return true;