refactor: improve code
This commit is contained in:
@@ -86,10 +86,11 @@ function utils.unescape(s)
|
||||
return str
|
||||
end
|
||||
|
||||
function utils.file_exists(name)
|
||||
function ulib.exists(name)
|
||||
local f = io.open(name, "r")
|
||||
if f ~= nil then
|
||||
io.close(f)
|
||||
if f then
|
||||
f:close()
|
||||
--io.close(f)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user