-const char* getLastFolderPath(){
- if (g_strLastFolder.empty()) {
- GlobalPreferenceSystem().registerPreference( "LastFolder", make_property_string( g_strLastFolder ) );
- if (g_strLastFolder.empty()) {
- g_strLastFolder = g_qeglobals.m_userGamePath;
+const char* getLastMapFolderPath(){
+ if (g_strLastMapFolder.empty()) {
+ GlobalPreferenceSystem().registerPreference( "LastMapFolder", make_property_string( g_strLastMapFolder ) );
+ if (g_strLastMapFolder.empty()) {
+ StringOutputStream buffer( 1024 );
+ buffer << getMapsPath();
+ if ( !file_readable( buffer.c_str() ) ) {
+ buffer.clear();
+ buffer << g_qeglobals.m_userGamePath.c_str() << "/";
+ }
+ g_strLastMapFolder = buffer.c_str();