diff options
author | 2009-07-08 16:39:32 -0400 | |
---|---|---|
committer | 2009-07-08 16:39:32 -0400 | |
commit | 4e1daf28000a31a4c5a0a9d053f88961a2c7f44a (patch) | |
tree | 56a68c952cff8421246760f9366c8cbf4af32ef3 /init.lua | |
parent | 13ab6263227b6b0f47b8b2fe41584e6ffcc30503 (diff) |
Use lfs.attributes for existance test instead of fopen; init.lua
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -7,9 +7,8 @@ package.path = mpath..';'..package.path local loaded_user_modules = false local user_init = _USERHOME..'/init.lua' -local f = io.open(user_init) -if f then - f:close() +local lfs = require 'lfs' +if lfs.attributes(user_init) then local ret, errmsg = pcall(dofile, user_init) if not ret then error(errmsg) end loaded_user_modules = ret |