mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-29 11:53:23 +08:00
[!] bug fixed: #6769 Args parsing is not supporting quoting
git-svn-id: https://pykd.svn.codeplex.com/svn@53515 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
7c64eff59e
commit
8c58567865
@ -148,16 +148,19 @@ py( PDEBUG_CLIENT4 client, PCSTR args)
|
||||
boost::python::object result;
|
||||
|
||||
// ðàçáîð ïàðàìåòðîâ
|
||||
typedef boost::char_separator<char> char_separator_t;
|
||||
typedef boost::escaped_list_separator<char> char_separator_t;
|
||||
typedef boost::tokenizer< char_separator_t > char_tokenizer_t;
|
||||
|
||||
std::string argsStr( args );
|
||||
|
||||
char_tokenizer_t token( argsStr , char_separator_t( " \t" ) );
|
||||
char_tokenizer_t token( argsStr , char_separator_t( "\\", " \t", "\"" ) );
|
||||
std::vector<std::string> argsList;
|
||||
|
||||
for ( char_tokenizer_t::iterator it = token.begin(); it != token.end(); ++it )
|
||||
argsList.push_back( *it );
|
||||
{
|
||||
if ( *it != "" )
|
||||
argsList.push_back( *it );
|
||||
}
|
||||
|
||||
if ( argsList.size() == 0 )
|
||||
return S_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user