[Pkg-owncloud-commits] [owncloud-client] 15/70: Propagator: Give a more specific error message on file remove.

Sandro Knauß hefee-guest at moszumanska.debian.org
Tue Jul 1 10:21:18 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 1230e8733061ee0f3556f29cd93969e4bf50b872
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Mon Jun 16 13:34:59 2014 +0200

    Propagator: Give a more specific error message on file remove.
    
    If the file is removed during it is synced up, there is now a correct
    error message saying that, rather than "the file has changed during
    upload."
---
 src/mirall/propagator_qnam.cpp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/mirall/propagator_qnam.cpp b/src/mirall/propagator_qnam.cpp
index 5403a33..f869e30 100644
--- a/src/mirall/propagator_qnam.cpp
+++ b/src/mirall/propagator_qnam.cpp
@@ -270,9 +270,14 @@ void PropagateUploadFileQNAM::slotPutFinished()
     bool finished = job->reply()->hasRawHeader("ETag");
 
     if (!finished) {
+        QFileInfo fi(_propagator->_localDir + _item._file);
+        if( !fi.exists() ) {
+            _propagator->_activeJobs--;
+            done(SyncFileItem::SoftError, tr("The local file was removed during sync."));
+            return;
+        }
 
-        if (Utility::qDateTimeToTime_t(QFileInfo(_propagator->_localDir + _item._file).lastModified())
-                != _item._modtime) {
+        if (Utility::qDateTimeToTime_t(fi.lastModified()) != _item._modtime) {
             /* Uh oh:  The local file has changed during upload */
             _propagator->_activeJobs--;
             done(SyncFileItem::SoftError, tr("Local file changed during sync."));

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