From feb2749df6a2a7bbd708b7f4b109c4a6a7754b6e Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Thu, 3 Aug 2023 17:24:32 +0800 Subject: [PATCH] Add additional logging for folder size check Signed-off-by: Claudio Cambra --- src/libsync/discoveryphase.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libsync/discoveryphase.cpp b/src/libsync/discoveryphase.cpp index 9034da4b094c0..823eac935aed9 100644 --- a/src/libsync/discoveryphase.cpp +++ b/src/libsync/discoveryphase.cpp @@ -84,6 +84,7 @@ void DiscoveryPhase::checkFolderSizeLimit(const QString &path, const std::functi connect(propfindJob, &PropfindJob::result, this, [=](const QVariantMap &values) { const auto result = values.value(QLatin1String("size")).toLongLong(); const auto limit = _syncOptions._newBigFolderSizeLimit; + qCDebug(lcDiscovery) << "Folder size check complete for" << path << "result:" << result << "limit:" << limit; return completionCallback(result >= limit); }); propfindJob->start(); @@ -134,10 +135,14 @@ void DiscoveryPhase::checkSelectiveSyncExistingFolder(const QString &path) // If no size limit is enforced, or if is in whitelist (explicitly allowed) or in blacklist (explicitly disallowed), do nothing. if (!notifyExistingFolderOverLimit() || SyncJournalDb::findPathInSelectiveSyncList(_selectiveSyncWhiteList, path) || SyncJournalDb::findPathInSelectiveSyncList(_selectiveSyncBlackList, path)) { + qCDebug(lcDiscovery) << "Folder size check skipped for" << path << notifyExistingFolderOverLimit() + << SyncJournalDb::findPathInSelectiveSyncList(_selectiveSyncWhiteList, path) + << SyncJournalDb::findPathInSelectiveSyncList(_selectiveSyncBlackList, path); return; } checkFolderSizeLimit(path, [this, path](const bool bigFolder) { + qCDebug(lcDiscovery) << "Folder size check complete for" << path << "result:" << bigFolder; if (bigFolder) { // Notify the user and prompt for response. emit existingFolderNowBig(path);