fix file.parent
This commit is contained in:
parent
b9c2b0ba40
commit
4b09b108fd
@ -545,11 +545,11 @@ function file.prefix(path)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function file.parent(path)
|
function file.parent(path)
|
||||||
local pos = path:find("/")
|
local dir = path:match("(.*)/")
|
||||||
if not pos then
|
if not dir then
|
||||||
return file.prefix(path)..":"
|
return file.prefix(path)..":"
|
||||||
end
|
end
|
||||||
return path:sub(0, pos-1)
|
return dir
|
||||||
end
|
end
|
||||||
|
|
||||||
function file.path(path)
|
function file.path(path)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user