Oops this was a fail. ignore option was ignored if it was previously empty in grive_state. Fixes #50

syncer-move-dates
Vitaliy Filippov 2015-12-28 02:00:47 +03:00
parent ff9d7bcd14
commit 5fb3c187fe
1 changed files with 3 additions and 2 deletions

View File

@ -41,12 +41,13 @@ State::State( const fs::path& filename, const Val& options ) :
bool force = options.Has( "force" ) ? options["force"].Bool() : false ;
if ( options.Has( "ignore" ) && !m_ign.empty() && options["ignore"].Str() != m_ign )
if ( options.Has( "ignore" ) && options["ignore"].Str() != m_ign )
{
// also "-f" is implicitly turned on when ignore regexp is changed
// because without it grive would think that previously ignored files are deleted locally
if ( !m_ign.empty() )
force = true;
m_ign = options["ignore"].Str();
force = true;
}
else if ( options.Has( "dir" ) )
{