forked from mtcontrib/pipeworks
close the file handle after checking if the config file exists, add a comment
This commit is contained in:
parent
01e76e1ea7
commit
177966013a
2
init.lua
2
init.lua
@ -17,8 +17,10 @@ pipeworks.modpath = minetest.get_modpath("pipeworks")
|
|||||||
|
|
||||||
dofile(pipeworks.modpath.."/default_settings.txt")
|
dofile(pipeworks.modpath.."/default_settings.txt")
|
||||||
|
|
||||||
|
-- Read the external config file if it exists.
|
||||||
if io.open(pipeworks.worldpath.."/pipeworks_settings.txt","r") then
|
if io.open(pipeworks.worldpath.."/pipeworks_settings.txt","r") then
|
||||||
dofile(pipeworks.worldpath.."/pipeworks_settings.txt")
|
dofile(pipeworks.worldpath.."/pipeworks_settings.txt")
|
||||||
|
io.close()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Random variables
|
-- Random variables
|
||||||
|
Loading…
Reference in New Issue
Block a user