Compare commits

...

2 Commits

Author SHA1 Message Date
Sergio Callegari d8c2cc0a7a
Merge b1046be205 into 6901fbb169 2022-01-03 20:27:31 +01:00
Sergio Callegari b1046be205 Fix include patterns in .griveignore 2018-11-09 18:13:39 +01:00
1 changed files with 2 additions and 1 deletions

View File

@ -79,6 +79,7 @@ State::State( const fs::path& root, const Val& options ) :
m_ign_changed = m_orig_ign != "" && m_orig_ign != m_ign;
m_ign_re = boost::regex( m_ign.empty() ? "^\\.(grive$|grive_state$|trash)" : ( m_ign+"|^\\.(grive$|grive_state$|trash)" ) );
Log( "Ignore file regexp: %1%", m_ign_re.str(), log::verbose );
}
State::~State()
@ -388,7 +389,7 @@ bool State::ParseIgnoreFile( const char* buffer, int size )
for ( int j = 0; j < (int)parts.size(); j++ )
{
cur = cur.size() > 0 ? cur + "/" + parts[j] : "^" + parts[j];
str = ( str.size() > 0 ? str + "|" + cur : cur ) + ( j < (int)parts.size()-1 ? "$" : "(/|$)" );
str = ( str.size() > 0 ? str + "|" + cur : cur ) + "$";
}
include_re = include_re + ( include_re.size() > 0 ? "|" : "" ) + str;
}