From: Thomas Debesse Date: Sun, 16 Jun 2019 11:07:17 +0000 (+0200) Subject: radiant: mkdir config parent dir X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F129%2Fhead;p=xonotic%2Fnetradiant.git radiant: mkdir config parent dir --- 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(); }