From: Vanessa Ezekowitz Date: Wed, 18 Dec 2013 01:36:21 +0000 (-0500) Subject: close the file handle after checking if the config file exists, add a comment X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=177966013a7796c84036d23259fd2e6c7837ad63;p=zefram%2Fminetest%2Fpipeworks.git close the file handle after checking if the config file exists, add a comment --- diff --git a/init.lua b/init.lua index 7173e65..414edc4 100644 --- a/init.lua +++ b/init.lua @@ -17,8 +17,10 @@ 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() end -- Random variables