Skip to content

Commit

Permalink
Add additional logging for folder size check
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra committed Aug 3, 2023
1 parent 30a574e commit feb2749
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/libsync/discoveryphase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit feb2749

Please sign in to comment.