aboutsummaryrefslogtreecommitdiffstats
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/init.lua b/init.lua
index 6c55905..cc83695 100644
--- a/init.lua
+++ b/init.lua
@@ -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)