1
0
mirror of https://github.com/skywind3000/z.lua synced 2026-03-17 05:09:49 +00:00

new os.path.split

This commit is contained in:
skywind3000
2019-02-14 22:58:02 +08:00
parent 12c138a99c
commit 9dc260f8b4

2
z.lua
View File

@@ -625,7 +625,7 @@ function os.path.split(path)
return path:sub(1, 1), path:sub(2)
elseif windows then
local drive = path:match('^%a:') and path:sub(1, 2) or ''
if pos == 3 then
if pos == 3 and drive ~= '' then
return path:sub(1, 3), path:sub(4)
end
end