- if ( key.QueryValue(wxT(""), command) ) {
- // transform it from '%1' to '%s' style format string (now also
- // test for %L - apparently MS started using it as well for the
- // same purpose)
-
- // NB: we don't make any attempt to verify that the string is valid,
- // i.e. doesn't contain %2, or second %1 or .... But we do make
- // sure that we return a string with _exactly_ one '%s'!
- bool foundFilename = FALSE;
- size_t len = command.Len();
- for ( size_t n = 0; (n < len) && !foundFilename; n++ ) {
- if ( command[n] == wxT('%') &&
- (n + 1 < len) &&
- (command[n + 1] == wxT('1') ||
- command[n + 1] == wxT('L')) ) {
- // replace it with '%s'
- command[n + 1] = wxT('s');
-
- foundFilename = TRUE;
- }
- }
+ if ( key.QueryValue(wxEmptyString, command) ) {
+ bool foundFilename = CanonicalizeParams(command);