diff options
Diffstat (limited to 'pipeworks')
-rw-r--r-- | pipeworks/init.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pipeworks/init.lua b/pipeworks/init.lua index 92ce02c..499f6ba 100644 --- a/pipeworks/init.lua +++ b/pipeworks/init.lua @@ -16,9 +16,11 @@ pipeworks.modpath = minetest.get_modpath("pipeworks") dofile(pipeworks.modpath.."/default_settings.txt") -- Read the external config file if it exists. -if io.open(pipeworks.worldpath.."/pipeworks_settings.txt","r") then - dofile(pipeworks.worldpath.."/pipeworks_settings.txt") - io.close() +local worldsettingspath = pipeworks.worldpath.."/pipeworks_settings.txt" +local worldsettingsfile = io.open(worldsettingspath, "r") +if worldsettingsfile then + worldsettingsfile:close() + dofile(worldsettingspath) end -- Random variables |