]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/environment.cpp
plugins: unify About window wording
[xonotic/netradiant.git] / radiant / environment.cpp
index bc64964ab7e26cf4db3bdf9c4e31183cb54526cf..29a86226af3f4e211b7417d9a69b0c0ffc80e5e3 100644 (file)
@@ -167,8 +167,8 @@ void gamedetect(){
 
 namespace
 {
-CopiedString home_path;
-CopiedString app_path;
+       CopiedString home_path;
+       CopiedString app_path;
        CopiedString lib_path;
        CopiedString data_path;
 }
@@ -213,7 +213,7 @@ bool portable_app_setup(){
 const char* LINK_NAME =
 #if GDEF_OS_LINUX
        "/proc/self/exe"
-#else // FreeBSD and OSX
+#else // FreeBSD and macOS
        "/proc/curproc/file"
 #endif
 ;
@@ -289,8 +289,14 @@ void environment_init( int argc, char const* argv[] ){
        }
 
        if ( !portable_app_setup() ) {
+               // this is used on both Linux and macOS
+               // but a macOS specific code may be written instead
                StringOutputStream home( 256 );
                home << DirectoryCleaned(g_get_user_config_dir()) << "/" << RADIANT_BASENAME << "/";
+               // first create ~/.config
+               // since it may be missing on brand new home directory
+               Q_mkdir( g_get_user_config_dir() );
+               // then create ~/.config/netradiant
                Q_mkdir( home.c_str() );
                home_path = home.c_str();
        }