refactor: improve code
All checks were successful
Autotools pipeline / build-amd64 (push) Successful in 35s
Autotools pipeline / build-arm64 (push) Successful in 34s
Autotools pipeline / build-arm (push) Successful in 32s

This commit is contained in:
2026-04-06 19:00:51 +02:00
parent 903fcefc2a
commit 3b8d7744b5
3 changed files with 10 additions and 7 deletions

View File

@@ -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