Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libsync/syncengine.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libsync/syncengine.cpp b/src/libsync/syncengine.cpp
index 8a9381cdc..8810c0677 100644
--- a/src/libsync/syncengine.cpp
+++ b/src/libsync/syncengine.cpp
@@ -973,6 +973,16 @@ void SyncEngine::slotDiscoveryJobFinished(int discoveryResult)
_journal->commitIfNeededAndStartNewTransaction("Post discovery");
}
+ // FIXME: This is a reasonable safety check, but specifically just a hotfix.
+ // See: https://github.com/nextcloud/desktop/issues/1433
+ // It's still unclear why we can get an empty FileMap even though folder isn't empty
+ // For now: Re-check if folder is really empty, if not bail out
+ if (_csync_ctx.data()->local.files.empty() && QDir(_localPath).entryInfoList(QDir::NoDotAndDotDot).count() > 0) {
+ qCWarning(lcEngine) << "Received local tree with empty FileMap but sync folder isn't empty. Won't reconcile.";
+ finalize(false);
+ return;
+ }
+
_progressInfo->_currentDiscoveredRemoteFolder.clear();
_progressInfo->_currentDiscoveredLocalFolder.clear();
_progressInfo->_status = ProgressInfo::Reconcile;