]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
radiant: mkdir config parent dir 129/head
authorThomas Debesse <dev@illwieckz.net>
Sun, 16 Jun 2019 11:07:17 +0000 (13:07 +0200)
committerThomas Debesse <dev@illwieckz.net>
Sun, 16 Jun 2019 13:16:07 +0000 (15:16 +0200)
radiant/environment.cpp

index bc64964ab7e26cf4db3bdf9c4e31183cb54526cf..58554952f1f4d6f09d6c55e26930b27bee8fc70c 100644 (file)
@@ -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();
        }