From: Jocelyn Turcotte Date: Thu, 7 Sep 2017 08:26:19 +0000 (+0200) Subject: csync_statedb: (really) Make sure children of non-synced items aren't read from the DB X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~701^2~126 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=deb123b80d5afa6c894b9dac4a540e4fd3a8cae0;p=nextcloud-desktop.git csync_statedb: (really) Make sure children of non-synced items aren't read from the DB No tests are covering this and I reversed the original logic. --- diff --git a/src/csync/csync_statedb.cpp b/src/csync/csync_statedb.cpp index 3b0b33535..4d2598f79 100644 --- a/src/csync/csync_statedb.cpp +++ b/src/csync/csync_statedb.cpp @@ -457,7 +457,7 @@ int csync_statedb_get_below_path( CSYNC *ctx, const char *path ) { st.reset(); rc = _csync_file_stat_from_metadata_table(st, stmt); if( st ) { - if( st->path.startsWith(skipbase) ) + if( !st->path.startsWith(skipbase) ) break; CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "%s selective sync excluded because the parent is", st->path.constData()); }