mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-27 06:45:49 +03:00
Fix too many PROPFIND when starting a sync
csync would not update the etag (md5) for directoru in the database if the etag has changed, but none of the files within that directory actually changed
This commit is contained in:
parent
9939e325cf
commit
112285c9aa
3 changed files with 5 additions and 2 deletions
|
@ -181,6 +181,7 @@ struct csync_file_stat_s {
|
|||
int nlink; /* u32 */
|
||||
int type; /* u32 */
|
||||
int child_modified;/*bool*/
|
||||
int should_update_md5; /*bool */
|
||||
|
||||
char *destpath; /* for renames */
|
||||
const char *md5;
|
||||
|
|
|
@ -467,8 +467,10 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
|
|||
}
|
||||
|
||||
if (ctx->current_fs && !ctx->current_fs->child_modified
|
||||
&& ctx->current_fs->instruction == CSYNC_INSTRUCTION_EVAL)
|
||||
&& ctx->current_fs->instruction == CSYNC_INSTRUCTION_EVAL) {
|
||||
ctx->current_fs->instruction = CSYNC_INSTRUCTION_NONE;
|
||||
ctx->current_fs->should_update_md5 = true;
|
||||
}
|
||||
}
|
||||
ctx->current_fs = previous_fs;
|
||||
SAFE_FREE(filename);
|
||||
|
|
|
@ -120,7 +120,7 @@ static int _merge_file_trees_visitor(void *obj, void *data) {
|
|||
ctx = (CSYNC *) data;
|
||||
|
||||
/* search for UPDATED file */
|
||||
if (fs->instruction != CSYNC_INSTRUCTION_UPDATED) {
|
||||
if (fs->instruction != CSYNC_INSTRUCTION_UPDATED && !fs->should_update_md5) {
|
||||
rc = 0;
|
||||
goto out;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue