aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-03-19 20:44:07 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-03-19 20:44:07 +0200
commit1f56d71f190c67325bdc413dfbc6c8e4b8284d98 (patch)
tree04c5ad77c48d9d38899ae9e8b5509b1c94ab30ac /src/main.cpp
parent1ff20da5b689d1a5e5a89f7ca086d88bc47f837d (diff)
downloadhax-minetest-server-1f56d71f190c67325bdc413dfbc6c8e4b8284d98.tar.gz
hax-minetest-server-1f56d71f190c67325bdc413dfbc6c8e4b8284d98.zip
Rework directory structure
Diffstat (limited to '')
-rw-r--r--src/main.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index d08f88417..35595e5aa 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1033,8 +1033,13 @@ int main(int argc, char *argv[])
// No specific world was commanded
// Check if the world is found from the default directory, and if
// not, see if the legacy world directory exists.
- world_path = porting::path_user + DIR_DELIM + "server" + DIR_DELIM + "worlds" + DIR_DELIM + "world";
- std::string legacy_world_path = porting::path_user+DIR_DELIM+".."+DIR_DELIM+"world";
+ world_path = porting::path_user + DIR_DELIM + "worlds" + DIR_DELIM + "world";
+#ifdef RUN_IN_PLACE
+ std::string legacy_world_path = porting::path_user + DIR_DELIM +
+ ".." + DIR_DELIM + "world";
+#else
+ std::string legacy_world_path = porting::path_user + DIR_DELIM + "world";
+#endif
if(!fs::PathExists(world_path) && fs::PathExists(legacy_world_path)){
errorstream<<"Warning: Using legacy world directory \""
<<legacy_world_path<<"\""<<std::endl;
@@ -1445,7 +1450,7 @@ int main(int argc, char *argv[])
if(menudata.create_world_name != L"")
{
std::string path = porting::path_user + DIR_DELIM
- + "server" + DIR_DELIM + "worlds" + DIR_DELIM
+ "worlds" + DIR_DELIM
+ wide_to_narrow(menudata.create_world_name);
// Create world if it doesn't exist
if(!initializeWorld(path, menudata.create_world_gameid)){