Skip to content

Commit

Permalink
Bug fix: setProgress and setProgressCompleted should not exit with an…
Browse files Browse the repository at this point in the history
… error when the item progress is not managed.
  • Loading branch information
herve-er committed Nov 5, 2024
1 parent 3c5d6fb commit 89e9b5b
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;
LOG_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;
LOG_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 89e9b5b

Please sign in to comment.