fix missed reference on windows

This commit is contained in:
Lee Cannon 2022-12-12 00:13:13 +00:00
parent e322ca4fb5
commit 974bdff6b3
No known key found for this signature in database
GPG Key ID: 983D5E5CC5E1401F

View File

@ -41,7 +41,7 @@ pub fn fromPath(allocator: std.mem.Allocator, path: []const u8) ![]const u8 {
// On windows, we need to lowercase the drive name.
if (builtin.os.tag == .windows) {
if (buf.items.len > prefix.len + 1 and
std.ascii.isAlpha(buf.items[prefix.len]) and
std.ascii.isAlphanumeric(buf.items[prefix.len]) and
std.mem.startsWith(u8, buf.items[prefix.len + 1 ..], "%3A"))
{
buf.items[prefix.len] = std.ascii.toLower(buf.items[prefix.len]);