Unverified Commit 8a38e820 authored by Michael Schuster's avatar Michael Schuster Committed by GitHub

Merge pull request #2184 from nextcloud/backport/2183/stable-2.6

[stable-2.6] Prevent empty FileMap in local csync to be processed if folder not empty
parents cba879e2 475267af
......@@ -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.";
_progressInfo->_status = ProgressInfo::Reconcile;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment