[Pkg-owncloud-commits] [owncloud-client] 20/89: Show local MOVE operations only for top level directory instead for all files.

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Dec 14 01:02:30 UTC 2013


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 6fad20d5fc423b2e5425a74bc3f4747a2f9da07a
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Fri Dec 6 12:32:26 2013 +0100

    Show local MOVE operations only for top level directory instead for all
    files.
    
    This fixes bug mirall#1240
---
 src/mirall/owncloudpropagator.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/mirall/owncloudpropagator.cpp b/src/mirall/owncloudpropagator.cpp
index 157b2bb..7a412d0 100644
--- a/src/mirall/owncloudpropagator.cpp
+++ b/src/mirall/owncloudpropagator.cpp
@@ -843,10 +843,13 @@ DECLARE_JOB(PropagateLocalRename)
 
 void PropagateLocalRename::start()
 {
-    emit progress(Progress::StartRename, _item, 0, _item._size);
+    // if the file is a file underneath a moved dir, the _item.file is equal
+    // to _item.renameTarget and the file is not moved as a result.
     if (_item._file != _item._renameTarget) {
+        emit progress(Progress::StartRename, _item, 0, _item._size);
         qDebug() << "MOVE " << _propagator->_localDir + _item._file << " => " << _propagator->_localDir + _item._renameTarget;
         QFile::rename(_propagator->_localDir + _item._file, _propagator->_localDir + _item._renameTarget);
+        emit progress(Progress::EndRename, _item, _item._size, _item._size);
     }
 
     _item._instruction = CSYNC_INSTRUCTION_DELETED;
@@ -861,7 +864,6 @@ void PropagateLocalRename::start()
     _propagator->_journal->setFileRecord(record);
     _propagator->_journal->commit("localRename");
 
-    emit progress(Progress::EndRename, _item, _item._size, _item._size);
 
     done(SyncFileItem::Success);
 }

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