diff options
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1,9 +1,10 @@ local function file_exists(path) local f = io.open(path) - if f ~= nil then - debug.getmetatable(f)["__gc"] = io.close + local out = f ~= nil + if out then + io.close(f) end - return f ~= nil + return out end local function open_rej_file(file) |