summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2015-08-15 17:15:08 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2015-08-15 17:15:08 -0400
commit1cd22167310403b1dafc110c8a629f60b80711a3 (patch)
tree12a0d27f87fb99a00d9d901e3a192f63d97f2d9f
parent2aad14a8836260516320acb0c4376e0eb3b100ab (diff)
don't copy default settings to user's world folder.
-rw-r--r--init.lua17
1 files changed, 2 insertions, 15 deletions
diff --git a/init.lua b/init.lua
index 391ab68..d2c5128 100644
--- a/init.lua
+++ b/init.lua
@@ -24,21 +24,8 @@ local modpath=minetest.get_modpath("moretrees")
dofile(modpath.."/default_settings.txt")
-if io.open(worldpath.."/moretrees_settings.txt","r") == nil then
-
- io.input(modpath.."/default_settings.txt")
- io.output(worldpath.."/moretrees_settings.txt")
-
- local size = 2^13 -- good buffer size (8K)
- while true do
- local block = io.read(size)
- if not block then
- io.close()
- break
- end
- io.write(block)
- end
-else
+if io.open(worldpath.."/moretrees_settings.txt","r") then
+ io.close()
dofile(worldpath.."/moretrees_settings.txt")
end