X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=blobdiff_plain;f=radiant%2Fenvironment.cpp;h=58554952f1f4d6f09d6c55e26930b27bee8fc70c;hp=bc64964ab7e26cf4db3bdf9c4e31183cb54526cf;hb=eec481a9af919df2f920dd2204daba5f505b4fba;hpb=292a05fa82ac228d5176164d75383348e7742467 diff --git a/radiant/environment.cpp b/radiant/environment.cpp index bc64964a..58554952 100644 --- a/radiant/environment.cpp +++ b/radiant/environment.cpp @@ -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(); }