[Pkg-owncloud-commits] [owncloud-client] 03/33: More fix for moving shared directories

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Feb 27 19:44:24 UTC 2014


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

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

commit a51f050a08470f29df286cde8b16c0f230ede112
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Wed Feb 19 13:06:55 2014 +0100

    More fix for moving shared directories
    
    Abort a directory job if the first job fails
    
    Also make sure the jobs are in the directory job of their destination paths
---
 src/mirall/owncloudpropagator.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/mirall/owncloudpropagator.cpp b/src/mirall/owncloudpropagator.cpp
index fa0ff99..31b65ba 100644
--- a/src/mirall/owncloudpropagator.cpp
+++ b/src/mirall/owncloudpropagator.cpp
@@ -895,6 +895,8 @@ void PropagateLocalRename::start()
 
 void PropagateRemoteRename::start()
 {
+    qDebug() << Q_FUNC_INFO << _item._file << "-->"<< _item._renameTarget;
+
     if (_item._file == _item._renameTarget) {
         if (!_item._isDirectory) {
             // The parents has been renamed already so there is nothing more to do.
@@ -1061,7 +1063,7 @@ void OwncloudPropagator::start(const SyncFileItemVector& _syncedItems)
             continue;
         }
 
-        while (!item._file.startsWith(directories.top().first)) {
+        while (!item.destination().startsWith(directories.top().first)) {
             directories.pop();
         }
 
@@ -1075,7 +1077,7 @@ void OwncloudPropagator::start(const SyncFileItemVector& _syncedItems)
             } else {
                 directories.top().second->append(dir);
             }
-            directories.push(qMakePair(item._file + "/" , dir));
+            directories.push(qMakePair(item.destination() + "/" , dir));
         } else if (PropagateItemJob* current = createJob(item)) {
             directories.top().second->append(current);
         }
@@ -1126,7 +1128,7 @@ void PropagateDirectory::start()
 
 void PropagateDirectory::proceedNext(SyncFileItem::Status status)
 {
-    if (status == SyncFileItem::FatalError) {
+    if (status == SyncFileItem::FatalError || (_current == -1 && status != SyncFileItem::Success)) {
         emit finished(status);
         return;
     } else if (status == SyncFileItem::NormalError || status == SyncFileItem::SoftError) {

-- 
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