- The arguments // and /// were being mis-identified as patterns.
This commit is contained in:
Paul Beckingham 2011-07-10 18:20:46 -04:00
parent 8e0296468e
commit 7f84fa0c80

View file

@ -889,10 +889,14 @@ bool Arguments::is_subst (const std::string& input)
// /<pattern>/ // /<pattern>/
bool Arguments::is_pattern (const std::string& input) bool Arguments::is_pattern (const std::string& input)
{ {
Nibbler n (input); std::string::size_type first = input.find ('/', 0);
std::string pattern; std::string::size_type second = input.find ('/', first + 1);
if (input.length () > 2 && std::string::size_type third = input.find ('/', second + 1);
n.getQuoted ('/', pattern, true))
if (first == 0 &&
second == input.length () - 1 &&
third == std::string::npos &&
second > 1)
return true; return true;
return false; return false;