file protocol and abs path (#10493)

This commit is contained in:
Dylan Conway
2024-04-24 18:55:13 -07:00
committed by GitHub
parent d789eb34c9
commit fdff887c0a
5 changed files with 168 additions and 71 deletions

View File

@@ -5084,7 +5084,7 @@ pub inline fn charIsAnySlash(char: u8) bool {
}
pub inline fn startsWithWindowsDriveLetter(s: []const u8) bool {
return s.len >= 2 and s[0] == ':' and switch (s[1]) {
return s.len > 2 and s[1] == ':' and switch (s[0]) {
'a'...'z', 'A'...'Z' => true,
else => false,
};