mirror of https://github.com/vitalif/grive2
Oops this was a fail. ignore option was ignored if it was previously empty in grive_state. Fixes #50
parent
ff9d7bcd14
commit
5fb3c187fe
|
@ -41,12 +41,13 @@ State::State( const fs::path& filename, const Val& options ) :
|
||||||
|
|
||||||
bool force = options.Has( "force" ) ? options["force"].Bool() : false ;
|
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
|
// also "-f" is implicitly turned on when ignore regexp is changed
|
||||||
// because without it grive would think that previously ignored files are deleted locally
|
// because without it grive would think that previously ignored files are deleted locally
|
||||||
|
if ( !m_ign.empty() )
|
||||||
|
force = true;
|
||||||
m_ign = options["ignore"].Str();
|
m_ign = options["ignore"].Str();
|
||||||
force = true;
|
|
||||||
}
|
}
|
||||||
else if ( options.Has( "dir" ) )
|
else if ( options.Has( "dir" ) )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue