mirror of https://github.com/vitalif/grive2
Fix include patterns in .griveignore
parent
84c57c121e
commit
c9990b5954
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue