From: Olivier Goffart Date: Tue, 24 May 2016 13:17:35 +0000 (+0200) Subject: SyncEngine: cleanup setting isDirectory X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~1167^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=fff5c280b3d5cee6c476fb9e9ed61991b4295ecc;p=nextcloud-desktop.git SyncEngine: cleanup setting isDirectory --- diff --git a/src/libsync/syncengine.cpp b/src/libsync/syncengine.cpp index f3e908461..36fefc036 100644 --- a/src/libsync/syncengine.cpp +++ b/src/libsync/syncengine.cpp @@ -548,13 +548,12 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote ) bool directoryEtagUpdate = isDirectory && file->should_update_metadata; bool localMetadataUpdate = !remote && file->should_update_metadata; if (!directoryEtagUpdate) { + item->_isDirectory = isDirectory; if (localMetadataUpdate) { // Hack, we want a local metadata update to happen, but only if the // remote tree doesn't ask us to do some kind of propagation. - item->_isDirectory = isDirectory; _syncItemMap.insert(key, item); } - item->_isDirectory = isDirectory; emit syncItemDiscovered(*item); return re; } @@ -581,7 +580,7 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote ) // An upload of an existing file means that the file was left unchanged on the server // This counts as a NONE for detecting if all the files on the server were changed _hasNoneFiles = true; - } else if (!item->_isDirectory) { + } else if (!isDirectory) { if (std::difftime(file->modtime, file->other.modtime) < 0) { // We are going back on time _backInTimeFiles++;