supports XDG_CONFIG_HOME on Linux
authorThomas Debesse <dev@illwieckz.net>
Wed, 12 Jul 2017 00:09:11 +0000 (02:09 +0200)
committerThomas Debesse <dev@illwieckz.net>
Sat, 29 Jul 2017 16:23:07 +0000 (18:23 +0200)
- stores NetRadiant config in ~/.config/netradiant
  or in ${XDG_CONFIG_HOME}/netradiant if set
  instead of ~/.netradiant

radiant/environment.cpp

index 954847e..4e15c81 100644 (file)
@@ -245,7 +245,7 @@ void environment_init( int argc, char* argv[] ){
 
        if ( !portable_app_setup() ) {
                StringOutputStream home( 256 );
-               home << DirectoryCleaned( g_get_home_dir() ) << ".netradiant/";
+               home << DirectoryCleaned( g_get_user_config_dir() ) << "netradiant/";
                Q_mkdir( home.c_str() );
                home_path = home.c_str();
        }