Skip to content

Commit 9dc260f

Browse files
author
skywind3000
committed
new os.path.split
1 parent 12c138a commit 9dc260f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

z.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ function os.path.split(path)
625625
return path:sub(1, 1), path:sub(2)
626626
elseif windows then
627627
local drive = path:match('^%a:') and path:sub(1, 2) or ''
628-
if pos == 3 then
628+
if pos == 3 and drive ~= '' then
629629
return path:sub(1, 3), path:sub(4)
630630
end
631631
end

0 commit comments

Comments
 (0)