Skip to content

Commit

Permalink
Merge pull request #374 from Infomaniak/KDESKTOP-1340-ProgressInfo-se…
Browse files Browse the repository at this point in the history
…tProgress-should-not-fail-on-omited-operation

Bug fix: setProgress  should not exit with an error when the item progress is not managed.
  • Loading branch information
herve-er authored Nov 6, 2024
2 parents 3c5d6fb + 607ebdb commit db709b8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/libsyncengine/progress/progressinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ bool ProgressInfo::setProgress(const SyncPath &path, const int64_t completed) {

const auto it = _currentItems.find(normalizedPath);
if (it == _currentItems.end() || it->second.empty()) {
return false;
LOGW_INFO(Log::instance()->getLogger(),
L"Item not found in ProgressInfo list (normal for ommited operation): " << Utility::formatSyncPath(path));
return true;
}

if (const SyncFileItem &item = it->second.front().item(); !shouldCountProgress(item)) {
Expand All @@ -140,7 +142,9 @@ bool ProgressInfo::setProgressComplete(const SyncPath &path, const SyncFileStatu

const auto it = _currentItems.find(normalizedPath);
if (it == _currentItems.end() || it->second.empty()) {
return false;
LOGW_INFO(Log::instance()->getLogger(),
L"Item not found in ProgressInfo list (normal for ommited operation): " << Utility::formatSyncPath(path));
return true;
}

SyncFileItem &item = it->second.front().item();
Expand Down

0 comments on commit db709b8

Please sign in to comment.