summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2013-12-17 20:36:21 -0500
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2013-12-17 20:36:21 -0500
commit177966013a7796c84036d23259fd2e6c7837ad63 (patch)
treeb8ae4d8fb00aaeecd7e7e0f97646671b86b77278
parent01e76e1ea793dee1eaa4c6b800f0786d030e6051 (diff)
downloadpipeworks-177966013a7796c84036d23259fd2e6c7837ad63.tar
pipeworks-177966013a7796c84036d23259fd2e6c7837ad63.tar.gz
pipeworks-177966013a7796c84036d23259fd2e6c7837ad63.tar.bz2
pipeworks-177966013a7796c84036d23259fd2e6c7837ad63.tar.xz
pipeworks-177966013a7796c84036d23259fd2e6c7837ad63.zip
close the file handle after checking if the config file exists, add a comment
-rw-r--r--init.lua2
1 files changed, 2 insertions, 0 deletions
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