From 706cfe88d0b8e98347372c32db7d462f4a26ee58 Mon Sep 17 00:00:00 2001 From: Camila San Date: Mon, 4 Feb 2019 15:10:29 +0100 Subject: Fixes syncing in sub directories. Signed-off-by: Camila San --- src/csync/csync_reconcile.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/csync/csync_reconcile.cpp b/src/csync/csync_reconcile.cpp index 68457f64c..f89774d13 100644 --- a/src/csync/csync_reconcile.cpp +++ b/src/csync/csync_reconcile.cpp @@ -369,8 +369,13 @@ static void _csync_merge_algorithm_visitor(csync_file_stat_t *cur, CSYNC * ctx) cur->instruction = CSYNC_INSTRUCTION_NONE; if (is_conflict) other->instruction = CSYNC_INSTRUCTION_CONFLICT; - else - other->instruction = !cur->is_fuse_created_file ? CSYNC_INSTRUCTION_UPDATE_METADATA : CSYNC_INSTRUCTION_SYNC; + else { + if(other->type == ItemTypeDirectory && cur->type == ItemTypeDirectory) + other->instruction = CSYNC_INSTRUCTION_UPDATE_METADATA; + else + other->instruction = (!cur->is_fuse_created_file) ? CSYNC_INSTRUCTION_UPDATE_METADATA : CSYNC_INSTRUCTION_SYNC; + } + } break; -- cgit v1.2.3