Check for init.lua existence properly

Fixes #501
develop
lethosor 2015-01-30 16:37:23 -05:00
parent daf739fcec
commit 3ab558c72d
1 changed files with 1 additions and 1 deletions

@ -475,7 +475,7 @@ if dfhack.is_core_context then
local env = setmetatable({ SAVE_PATH = path }, { __index = base_env })
local f,perr = loadfile(name, 't', env)
if f == nil then
if not string.match(perr, 'No such file or directory') then
if dfhack.filesystem.exists(name) then
dfhack.printerr(perr)
end
elseif safecall(f) then