Merge pull request #109 from wrapperup/drive-letter-windows

fix: opening with lowercase drive letters
This commit is contained in:
Steven Arcangeli 2023-05-21 17:40:10 -07:00 committed by GitHub
commit 0bfa381307
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,7 +57,7 @@ M.os_to_posix_path = function(path)
if M.is_windows then
if M.is_absolute(path) then
local drive, rem = path:match("^([^:]+):\\(.*)$")
return string.format("/%s/%s", drive, rem:gsub("\\", "/"))
return string.format("/%s/%s", drive:upper(), rem:gsub("\\", "/"))
else
return path:gsub("\\", "/")
end