From: Perttu Ahola Date: Mon, 20 Jun 2011 15:04:49 +0000 (+0300) Subject: path_userdata is now created before potentially creating debug.txt in there X-Git-Tag: 0.2.20110731_3~102 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=051c0048d8068b8690eee70e5491751e12c0fa30;p=oweals%2Fminetest.git path_userdata is now created before potentially creating debug.txt in there --- diff --git a/src/main.cpp b/src/main.cpp index ae52bc36d..be932cdf2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1140,6 +1140,9 @@ int main(int argc, char *argv[]) // Initialize porting::path_data and porting::path_userdata porting::initializePaths(); + // Create user data directory + fs::CreateDir(porting::path_userdata); + // Initialize debug streams #ifdef RUN_IN_PLACE std::string debugfile = DEBUGFILE; @@ -1152,9 +1155,6 @@ int main(int argc, char *argv[]) DSTACK(__FUNCTION_NAME); - // Create user data directory - fs::CreateDir(porting::path_userdata); - // Init material properties table //initializeMaterialProperties(); diff --git a/src/servermain.cpp b/src/servermain.cpp index 6eb45ea22..91b31fb58 100644 --- a/src/servermain.cpp +++ b/src/servermain.cpp @@ -139,6 +139,9 @@ int main(int argc, char *argv[]) // Initialize porting::path_data and porting::path_userdata porting::initializePaths(); + // Create user data directory + fs::CreateDir(porting::path_userdata); + // Initialize debug streams #ifdef RUN_IN_PLACE std::string debugfile = DEBUGFILE;