close the file handle after checking if the config file exists, add a comment
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Wed, 18 Dec 2013 01:36:21 +0000 (20:36 -0500)
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Wed, 18 Dec 2013 01:36:21 +0000 (20:36 -0500)
init.lua

index 7173e653cb07e93461ec0ec1c149dd7d18936c63..414edc4db5baad57e16a20b6437c82aeaf912a76 100644 (file)
--- 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