path_userdata is now created before potentially creating debug.txt in there
authorPerttu Ahola <celeron55@gmail.com>
Mon, 20 Jun 2011 15:04:49 +0000 (18:04 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Mon, 20 Jun 2011 15:04:49 +0000 (18:04 +0300)
src/main.cpp
src/servermain.cpp

index ae52bc36d73ae7c7aaa4d2eb8c78db36f8e8d0dd..be932cdf2fbf47e3831baa565608c971a1fd3e78 100644 (file)
@@ -1140,6 +1140,9 @@ int main(int argc, char *argv[])
        // Initialize porting::path_data and porting::path_userdata\r
        porting::initializePaths();\r
 \r
+       // Create user data directory\r
+       fs::CreateDir(porting::path_userdata);\r
+       \r
        // Initialize debug streams\r
 #ifdef RUN_IN_PLACE\r
        std::string debugfile = DEBUGFILE;\r
@@ -1152,9 +1155,6 @@ int main(int argc, char *argv[])
 \r
        DSTACK(__FUNCTION_NAME);\r
 \r
-       // Create user data directory\r
-       fs::CreateDir(porting::path_userdata);\r
-       \r
        // Init material properties table\r
        //initializeMaterialProperties();\r
 \r
index 6eb45ea22a647def391a456f077f986c1a56bfdd..91b31fb58ee98d9acb734de62c245259175f64de 100644 (file)
@@ -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;