diff options
-rw-r--r-- | init.lua | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,5 +1,8 @@ local function file_exists(path) - local f <close> = io.open(path) + local f = io.open(path) + if f ~= nil then + debug.getmetatable(f)["__gc"] = io.close + end return f ~= nil end |