fix file.parent

This commit is contained in:
MihailRis
2025-03-12 23:40:34 +03:00
parent b9c2b0ba40
commit 4b09b108fd
+3 -3
View File
@@ -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)