Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix: setProgress should not exit with an error when the item progress is not managed. #374

Conversation

herve-er
Copy link
Contributor

@herve-er herve-er commented Nov 5, 2024

Description

Currently, calling ProgressInfo::setProgress on an item that is not in the _currentItems list returns an error. It should instead behave as if !shouldCountProgress and return successfully.

This is problematic in the case of omitted operations, which will systematically generate an error. This error prevent us to correctly set the vfs and status of the file.

… error when the item progress is not managed.
@herve-er herve-er requested a review from a team as a code owner November 5, 2024 10:08
@herve-er herve-er added the 3.6.7 label Nov 5, 2024
Copy link

sonarqubecloud bot commented Nov 5, 2024

@herve-er herve-er merged commit db709b8 into develop Nov 6, 2024
6 checks passed
@herve-er herve-er deleted the KDESKTOP-1340-ProgressInfo-setProgress-should-not-fail-on-omited-operation branch November 6, 2024 06:51
@@ -140,7 +142,9 @@ bool ProgressInfo::setProgressComplete(const SyncPath &path, const SyncFileStatu

const auto it = _currentItems.find(normalizedPath);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two blocks looks identical. Refactoring to remove redundancy would let us write a fix in a single place.

@luc-guyot-infomaniak luc-guyot-infomaniak added this to the 3.6.7 milestone Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants