diff --git a/radiant/main.cpp b/radiant/main.cpp index 77be132f..87b5d12e 100644 --- a/radiant/main.cpp +++ b/radiant/main.cpp @@ -186,13 +186,13 @@ int loki_getmountpoint( const char *device, char *mntpt, int max_size ){ This function gets the directory containing the running program. argv0 - the 0'th argument to the program */ -char* loki_init_datapath( char *argv0 ){ +void loki_init_datapath( char *argv0 ){ char temppath[PATH_MAX]; - char *home; + const char *home; home = g_get_home_dir(); if ( home == NULL ) { - home = const_cast("."); + home = "."; } strcpy( temppath, argv0 ); @@ -204,10 +204,6 @@ char* loki_init_datapath( char *argv0 ){ } } -char *loki_get_datapath( void ){ - return datapath; -} - #endif // end of Loki stuff @@ -513,7 +509,7 @@ int mainRadiant( int argc, char* argv[] ) { AddSlash( g_strTempPath ); loki_init_datapath( argv[0] ); - g_strAppPath = loki_get_datapath(); + g_strAppPath = datapath; const char *xdg_data_home = getenv( "XDG_DATA_HOME" ); if ( xdg_data_home != nullptr ) {