QIcon icon;
if (item._status == SyncFileItem::NormalError
|| item._status == SyncFileItem::FatalError
+ || item._status == SyncFileItem::DetailError
|| item._status == SyncFileItem::BlacklistedError) {
icon = Theme::instance()->syncStateIcon(SyncResult::Error);
} else if (Progress::isWarningKind(item._status)) {
bool mayBlacklist =
item._errorMayBeBlacklisted // explicitly flagged for blacklisting
|| ((item._status == SyncFileItem::NormalError
- || item._status == SyncFileItem::SoftError)
+ || item._status == SyncFileItem::SoftError
+ || item._status == SyncFileItem::DetailError)
&& item._httpErrorCode != 0 // or non-local error
);
case SyncFileItem::SoftError:
case SyncFileItem::FatalError:
case SyncFileItem::NormalError:
- case SyncFileItem::BlacklistedError:
+ case SyncFileItem::DetailError:
// Check the blacklist, possibly adjusting the item (including its status)
- // but not if this status comes from blacklisting in the first place
- if (!(_item->_status == SyncFileItem::BlacklistedError
- && _item->_instruction == CSYNC_INSTRUCTION_IGNORE)) {
- blacklistUpdate(propagator()->_journal, *_item);
- }
+ blacklistUpdate(propagator()->_journal, *_item);
break;
case SyncFileItem::Success:
case SyncFileItem::Restoration:
case SyncFileItem::Conflict:
case SyncFileItem::FileIgnored:
case SyncFileItem::NoStatus:
+ case SyncFileItem::BlacklistedError:
// nothing
break;
}
if (status == SyncFileItem::FatalError
|| status == SyncFileItem::NormalError
- || status == SyncFileItem::SoftError) {
+ || status == SyncFileItem::SoftError
+ || status == SyncFileItem::DetailError) {
_hasError = status;
}
return kind == SyncFileItem::SoftError || kind == SyncFileItem::NormalError
|| kind == SyncFileItem::FatalError || kind == SyncFileItem::FileIgnored
|| kind == SyncFileItem::Conflict || kind == SyncFileItem::Restoration
- || kind == SyncFileItem::BlacklistedError;
+ || kind == SyncFileItem::DetailError || kind == SyncFileItem::BlacklistedError;
}
bool Progress::isIgnoredKind(SyncFileItem::Status kind)
const auto diskSpaceResult = propagator()->diskSpaceCheck();
if (diskSpaceResult != OwncloudPropagator::DiskSpaceOk) {
if (diskSpaceResult == OwncloudPropagator::DiskSpaceFailure) {
- // Using BlacklistedError here will make the error not pop up in the account
+ // Using DetailError here will make the error not pop up in the account
// tab: instead we'll generate a general "disk space low" message and show
// these detail errors only in the error view.
- done(SyncFileItem::BlacklistedError,
+ done(SyncFileItem::DetailError,
tr("The download would reduce free local disk space below the limit"));
emit propagator()->insufficientLocalStorage();
} else if (diskSpaceResult == OwncloudPropagator::DiskSpaceCritical) {
if (_item->_httpErrorCode == 507) {
// Insufficient remote storage.
- _item->_errorMayBeBlacklisted = true;
- status = SyncFileItem::BlacklistedError;
+ status = SyncFileItem::DetailError;
errorString = tr("Upload of %1 exceeds the quota for the folder").arg(Utility::octetsToString(_item->_size));
emit propagator()->insufficientRemoteStorage();
}
FileIgnored, ///< The file is in the ignored list (or blacklisted with no retries left)
Restoration, ///< The file was restored because what should have been done was not allowed
- /** For files whose errors were blacklisted.
+ /** For errors that should only appear in the error view.
*
- * If _instruction == IGNORE, the file wasn't even reattempted.
+ * Some errors also produce a summary message. Usually displaying that message is
+ * sufficient, but the individual errors should still appear in the issues tab.
*
- * These errors should usually be shown as NormalErrors, but not be as loud
- * as them.
+ * These errors do cause the sync to fail.
+ *
+ * A NormalError that isn't as prominent.
+ */
+ DetailError,
+
+ /** For files whose errors were blacklisted
+ *
+ * If an file is blacklisted due to an error it isn't even reattempted. These
+ * errors should appear in the issues tab, but not on the account settings and
+ * should not cause the sync run to fail.
+ *
+ * A DetailError that doesn't cause sync failure.
*/
BlacklistedError
};
return item._instruction == CSYNC_INSTRUCTION_ERROR
|| status == SyncFileItem::NormalError
|| status == SyncFileItem::FatalError
+ || status == SyncFileItem::DetailError
|| status == SyncFileItem::BlacklistedError
|| item._hasBlacklistEntry;
}