* fix backslashes in opened by cmd line map path = fix duplicates in recent maps list
This commit is contained in:
parent
460df292ff
commit
16c00ac54c
|
|
@ -180,16 +180,15 @@ bool portable_app_setup(){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const char* g_openCmdMap;
|
CopiedString g_openMapByCmd;
|
||||||
|
|
||||||
void cmdMap(){
|
void cmdMap(){
|
||||||
g_openCmdMap = NULL;
|
|
||||||
for ( int i = 1; i < g_argc; ++i )
|
for ( int i = 1; i < g_argc; ++i )
|
||||||
{
|
|
||||||
//if ( !stricmp( g_argv[i] + strlen(g_argv[i]) - 4, ".map" ) ){
|
|
||||||
if( string_equal_suffix_nocase( g_argv[i], ".map" ) ){
|
if( string_equal_suffix_nocase( g_argv[i], ".map" ) ){
|
||||||
g_openCmdMap = g_argv[i];
|
StringOutputStream stream( 256 );
|
||||||
}
|
stream << PathCleaned( g_argv[i] );
|
||||||
|
g_openMapByCmd = stream.c_str();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ const char* environment_get_app_path();
|
||||||
extern int g_argc;
|
extern int g_argc;
|
||||||
extern const char** g_argv;
|
extern const char** g_argv;
|
||||||
|
|
||||||
extern const char* g_openCmdMap;
|
#include "string/stringfwd.h"
|
||||||
|
extern CopiedString g_openMapByCmd;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -654,8 +654,8 @@ int main( int argc, char* argv[] ){
|
||||||
|
|
||||||
hide_splash();
|
hide_splash();
|
||||||
|
|
||||||
if( g_openCmdMap && *g_openCmdMap ){
|
if( !g_openMapByCmd.empty() ){
|
||||||
Map_LoadFile( g_openCmdMap );
|
Map_LoadFile( g_openMapByCmd.c_str() );
|
||||||
}
|
}
|
||||||
else if ( g_bLoadLastMap && !g_strLastMap.empty() ) {
|
else if ( g_bLoadLastMap && !g_strLastMap.empty() ) {
|
||||||
Map_LoadFile( g_strLastMap.c_str() );
|
Map_LoadFile( g_strLastMap.c_str() );
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user