From cf51167b55246b7f90ad4970d9686637e8bb0beb Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Sun, 19 Aug 2018 23:58:06 +0300 Subject: [PATCH] Return lost * matching back - fixes #223 --- libgrive/src/base/State.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libgrive/src/base/State.cc b/libgrive/src/base/State.cc index 73c0d27..9f414bb 100644 --- a/libgrive/src/base/State.cc +++ b/libgrive/src/base/State.cc @@ -335,6 +335,7 @@ bool State::ParseIgnoreFile( const char* buffer, int size ) { const boost::regex re1( "([^\\\\]|^)[\\t\\r ]+$" ); const boost::regex re2( "^[\\t\\r ]+" ); + const boost::regex re4( "([^\\\\](\\\\\\\\)*|^)\\\\\\*" ); const boost::regex re5( "([^\\\\](\\\\\\\\)*|^)\\\\\\?" ); std::string exclude_re, include_re; std::vector lines = split( boost::regex( "[\\n\\r]+" ), buffer, size ); @@ -368,6 +369,7 @@ bool State::ParseIgnoreFile( const char* buffer, int size ) while (1) { str1 = regex_replace( parts[j], re5, "$1[^/]", boost::format_perl ); + str1 = regex_replace( str1, re4, "$1[^/]*", boost::format_perl ); if ( str1.size() == parts[j].size() ) break; parts[j] = str1;