mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix file.ext
This commit is contained in:
parent
db53076c62
commit
60f184ae43
2 changed files with 6 additions and 1 deletions
|
|
@ -1,3 +1,8 @@
|
|||
debug.log("file extension")
|
||||
asserts.equals(nil, file.ext("config:test"))
|
||||
asserts.equals("cfg", file.ext("config:test.cfg"))
|
||||
asserts.equals("gz", file.ext("config:test.cfg.gz"))
|
||||
|
||||
debug.log("check initial state")
|
||||
assert(file.exists("config:"))
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ function file.stem(path)
|
|||
end
|
||||
|
||||
function file.ext(path)
|
||||
return path:match("%.([^:/\\]+)$")
|
||||
return path:match("[^:/\\.]%.([^.:/\\]+)$")
|
||||
end
|
||||
|
||||
function file.prefix(path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue