mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 21:46:03 +03:00
blacklist: use the _ERROR instruction instead of _IGNORE
When something is in the blacklist, still use the _ERROR instruction that way the applications can still report errors for blacklisted items
This commit is contained in:
parent
18e9357aaf
commit
2caa69e0cb
3 changed files with 7 additions and 3 deletions
|
@ -198,6 +198,7 @@ PropagateItemJob* OwncloudPropagator::createJob(const SyncFileItem& item) {
|
|||
return new PropagateLocalRename(this, item);
|
||||
}
|
||||
case CSYNC_INSTRUCTION_IGNORE:
|
||||
case CSYNC_INSTRUCTION_ERROR:
|
||||
return new PropagateIgnoreJob(this, item);
|
||||
default:
|
||||
return 0;
|
||||
|
|
|
@ -164,7 +164,8 @@ public:
|
|||
PropagateIgnoreJob(OwncloudPropagator* propagator,const SyncFileItem& item)
|
||||
: PropagateItemJob(propagator, item) {}
|
||||
void start() {
|
||||
done(SyncFileItem::FileIgnored, _item._errorString);
|
||||
SyncFileItem::Status status = _item._status;
|
||||
done(status == SyncFileItem::NoStatus ? SyncFileItem::FileIgnored : status, _item._errorString);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -236,7 +236,8 @@ bool SyncEngine::checkBlacklisting( SyncFileItem *item )
|
|||
|
||||
if( re ) {
|
||||
qDebug() << "Item is on blacklist: " << entry._file << "retries:" << entry._retryCount;
|
||||
item->_instruction = CSYNC_INSTRUCTION_IGNORE;
|
||||
item->_instruction = CSYNC_INSTRUCTION_ERROR;
|
||||
item->_status = SyncFileItem::FileIgnored;
|
||||
item->_errorString = tr("The item is not synced because of previous errors: %1").arg(entry._errorString);
|
||||
}
|
||||
}
|
||||
|
@ -368,7 +369,8 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote )
|
|||
checkBlacklisting( &item );
|
||||
|
||||
if (file->instruction != CSYNC_INSTRUCTION_IGNORE
|
||||
&& file->instruction != CSYNC_INSTRUCTION_REMOVE) {
|
||||
&& file->instruction != CSYNC_INSTRUCTION_REMOVE
|
||||
&& file->instruction != CSYNC_INSTRUCTION_ERROR) {
|
||||
_hasFiles = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue