Skip to content

Commit

Permalink
fix review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
  • Loading branch information
mgallien committed Oct 31, 2022
1 parent 4bc38d8 commit 54154a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/libsync/owncloudpropagator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,7 @@ void PropagateRootDirectory::slotSubJobsFinished(SyncFileItem::Status status)
return;
}

if (_hasError == SyncFileItem::NoStatus) {
if (_errorStatus == SyncFileItem::NoStatus) {
switch (status) {
case SyncFileItem::NoStatus:
case SyncFileItem::FatalError:
Expand All @@ -1355,7 +1355,7 @@ void PropagateRootDirectory::slotSubJobsFinished(SyncFileItem::Status status)
case SyncFileItem::Success:
break;
case SyncFileItem::BlacklistedError:
_hasError = SyncFileItem::BlacklistedError;
_errorStatus = SyncFileItem::BlacklistedError;
break;
}
}
Expand All @@ -1365,9 +1365,9 @@ void PropagateRootDirectory::slotSubJobsFinished(SyncFileItem::Status status)

void PropagateRootDirectory::slotDirDeletionJobsFinished(SyncFileItem::Status status)
{
if (_hasError != SyncFileItem::NoStatus && status == SyncFileItem::Success) {
qCInfo(lcPropagator) << "PropagateRootDirectory::slotDirDeletionJobsFinished" << "reporting previous error" << _hasError;
status = _hasError;
if (_errorStatus != SyncFileItem::NoStatus && status == SyncFileItem::Success) {
qCInfo(lcPropagator) << "PropagateRootDirectory::slotDirDeletionJobsFinished" << "reporting previous error" << _errorStatus;
status = _errorStatus;
}

_state = Finished;
Expand Down
2 changes: 1 addition & 1 deletion src/libsync/owncloudpropagator.h
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ private slots:

bool scheduleDelayedJobs();

SyncFileItem::Status _hasError = SyncFileItem::Status::NoStatus;
SyncFileItem::Status _errorStatus = SyncFileItem::Status::NoStatus;
};

/**
Expand Down

0 comments on commit 54154a7

Please sign in to comment.