[Pkg-owncloud-commits] [owncloud-client] 102/332: engine: When restoring the file, use the mtime and fileid from the server

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Aug 14 21:06:45 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 02355696ff22f2ee06c560d6970e803ae312a0b3
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Wed Jun 18 16:15:14 2014 +0200

    engine: When restoring the file, use the mtime and fileid from the server
    
    Important to switch the things around as we are going to write them in the DB
---
 src/mirall/syncengine.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/mirall/syncengine.cpp b/src/mirall/syncengine.cpp
index bb8f5ca..6a792a8 100644
--- a/src/mirall/syncengine.cpp
+++ b/src/mirall/syncengine.cpp
@@ -756,6 +756,10 @@ void SyncEngine::checkForPermission()
                     it->_instruction = CSYNC_INSTRUCTION_CONFLICT;
                     it->_direction = SyncFileItem::Down;
                     it->_isRestoration = true;
+                    // take the things to write to the db from the "other" node (i.e: info from server)
+                    it->_modtime = it->log._other_modtime;
+                    it->_fileId = it->log._other_fileId;
+                    it->_etag = it->log._other_etag;
                     it->_errorString = tr("Not allowed to upload this file because it is read-only on the server, restoring");
                     continue;
                 }

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