From 7f84fa0c809aeaf18865d0e8c23c0bf6169f14c1 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 10 Jul 2011 18:20:46 -0400 Subject: [PATCH] Bug - The arguments // and /// were being mis-identified as patterns. --- src/Arguments.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Arguments.cpp b/src/Arguments.cpp index 72a53aadb..a6071166c 100644 --- a/src/Arguments.cpp +++ b/src/Arguments.cpp @@ -889,10 +889,14 @@ bool Arguments::is_subst (const std::string& input) // // bool Arguments::is_pattern (const std::string& input) { - Nibbler n (input); - std::string pattern; - if (input.length () > 2 && - n.getQuoted ('/', pattern, true)) + std::string::size_type first = input.find ('/', 0); + std::string::size_type second = input.find ('/', first + 1); + std::string::size_type third = input.find ('/', second + 1); + + if (first == 0 && + second == input.length () - 1 && + third == std::string::npos && + second > 1) return true; return false;