[Pkg-owncloud-commits] [owncloud-client] 81/332: blacklist: use the _ERROR instruction instead of _IGNORE

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Aug 14 21:06:41 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 2caa69e0cb31b2c364250671df083a94431b045e
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Fri Jun 13 11:19:31 2014 +0200

    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
---
 src/mirall/owncloudpropagator.cpp | 1 +
 src/mirall/owncloudpropagator.h   | 3 ++-
 src/mirall/syncengine.cpp         | 6 ++++--
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/mirall/owncloudpropagator.cpp b/src/mirall/owncloudpropagator.cpp
index b8295cf..0003b0e 100644
--- a/src/mirall/owncloudpropagator.cpp
+++ b/src/mirall/owncloudpropagator.cpp
@@ -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;
diff --git a/src/mirall/owncloudpropagator.h b/src/mirall/owncloudpropagator.h
index aeede4a..33146aa 100644
--- a/src/mirall/owncloudpropagator.h
+++ b/src/mirall/owncloudpropagator.h
@@ -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);
     }
 };
 
diff --git a/src/mirall/syncengine.cpp b/src/mirall/syncengine.cpp
index b505a7b..65267d1 100644
--- a/src/mirall/syncengine.cpp
+++ b/src/mirall/syncengine.cpp
@@ -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;
     }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list