mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix file.parent
This commit is contained in:
parent
b9c2b0ba40
commit
4b09b108fd
1 changed files with 3 additions and 3 deletions
|
|
@ -545,11 +545,11 @@ function file.prefix(path)
|
|||
end
|
||||
|
||||
function file.parent(path)
|
||||
local pos = path:find("/")
|
||||
if not pos then
|
||||
local dir = path:match("(.*)/")
|
||||
if not dir then
|
||||
return file.prefix(path)..":"
|
||||
end
|
||||
return path:sub(0, pos-1)
|
||||
return dir
|
||||
end
|
||||
|
||||
function file.path(path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue