summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorSfan5 <sfan5@live.de>2013-09-09 20:07:25 +0200
committerSfan5 <sfan5@live.de>2013-09-09 22:50:51 +0200
commit49a75b18945bcbc75e59857374356497345f08af (patch)
tree55fd118df447015937f56d41a2be258d80e65fc4 /src/main.cpp
parent321ac665586d1a5ab06be4c7f15279ad63693a9d (diff)
downloadminetest-49a75b18945bcbc75e59857374356497345f08af.tar.gz
minetest-49a75b18945bcbc75e59857374356497345f08af.tar.bz2
minetest-49a75b18945bcbc75e59857374356497345f08af.zip
Make --migrate update world.mt too
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index ca3c3bc5d..dc67f29bb 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1266,7 +1266,11 @@ int main(int argc, char *argv[])
new_db->endSave();
actionstream << "Successfully migrated " << count << " blocks" << std::endl;
- actionstream << "Don't forget to update your world.mt backend setting!" << std::endl;
+ world_mt.set("backend", migrate_to);
+ if(!world_mt.updateConfigFile((world_path + DIR_DELIM + "world.mt").c_str()))
+ errorstream<<"Failed to update world.mt!"<<std::endl;
+ else
+ actionstream<<"world.mt updated"<<std::endl;
return 0;
}