Fix include patterns in .griveignore

pull/237/head
Sergio Callegari 2018-11-09 12:18:12 +01:00
parent 84c57c121e
commit c9990b5954
1 changed files with 2 additions and 1 deletions

View File

@ -77,6 +77,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()
@ -358,7 +359,7 @@ bool State::ParseIgnoreFile( const char* buffer, int size )
if ( !inc )
exclude_re = exclude_re + ( exclude_re.size() > 0 ? "|" : "" ) + str;
else
include_re = include_re + ( include_re.size() > 0 ? "|" : "" ) + str;
include_re = include_re + ( include_re.size() > 0 ? "|" : "" ) + str + "\\Z";
}
prev = i+1;
}