csync_statedb: Make sure children of non-synced items aren't read from the DB

Fix a regression during C++ conversion from 704ca366b3
This commit is contained in:
Jocelyn Turcotte 2017-09-07 10:16:16 +02:00 committed by Roeland Jago Douma
parent 41f215fd8d
commit 7a97dc1783
No known key found for this signature in database
GPG key ID: F941078878347C0C

View file

@ -457,7 +457,7 @@ int csync_statedb_get_below_path( CSYNC *ctx, const char *path ) {
st.reset(); st.reset();
rc = _csync_file_stat_from_metadata_table(st, stmt); rc = _csync_file_stat_from_metadata_table(st, stmt);
if( st ) { if( st ) {
if( st->path == skipbase ) if( st->path.startsWith(skipbase) )
break; break;
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "%s selective sync excluded because the parent is", st->path.constData()); CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "%s selective sync excluded because the parent is", st->path.constData());
} }