[Pkg-owncloud-commits] [owncloud-client] 33/78: Remember to upload files that are locked during a sync run (#4865)

Sandro Knauß hefee-guest at moszumanska.debian.org
Fri Jun 24 16:29:40 UTC 2016


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 bf02ccc1e8d4649fdb880fa46a8d7196db198dd2
Author: ckamm <mail at ckamm.de>
Date:   Mon May 23 09:03:03 2016 +0200

    Remember to upload files that are locked during a sync run (#4865)
    
    See owncloud/enterprise#1342
---
 src/libsync/propagateupload.cpp | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/libsync/propagateupload.cpp b/src/libsync/propagateupload.cpp
index 9f98331..2ef53dd 100644
--- a/src/libsync/propagateupload.cpp
+++ b/src/libsync/propagateupload.cpp
@@ -546,8 +546,16 @@ void PropagateUploadFileQNAM::startNextChunk()
                 _transmissionChecksumType, _transmissionChecksum);
     }
 
-    if (! device->prepareAndOpen(_propagator->getFilePath(_item->_file), chunkStart, currentChunkSize)) {
+    const QString fileName = _propagator->getFilePath(_item->_file);
+    if (! device->prepareAndOpen(fileName, chunkStart, currentChunkSize)) {
         qDebug() << "ERR: Could not prepare upload device: " << device->errorString();
+
+        // If the file is currently locked, we want to retry the sync
+        // when it becomes available again.
+        if (FileSystem::isFileLocked(fileName)) {
+            emit _propagator->seenLockedFile(fileName);
+        }
+
         // Soft error because this is likely caused by the user modifying his files while syncing
         abortWithError( SyncFileItem::SoftError, device->errorString() );
         delete device;

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