[Pkg-owncloud-commits] [owncloud-client] 122/332: permissions: record them even if the instruction is NONE

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Aug 14 21:06:48 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 e19214c3c4ca2ee59836798a422331afceca6d66
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Mon Jun 23 13:35:34 2014 +0200

    permissions: record them even if the instruction is NONE
    
    when the instruction is NONE, we may return from this function
    before having registered the permission in the SyncEngine::_remotePerms
    hash.
    Move the code a bit up.
---
 src/mirall/syncengine.cpp | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/mirall/syncengine.cpp b/src/mirall/syncengine.cpp
index 562081a..b65d075 100644
--- a/src/mirall/syncengine.cpp
+++ b/src/mirall/syncengine.cpp
@@ -280,6 +280,10 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote )
     // record the seen files to be able to clean the journal later
     _seenFiles.insert(item._file);
 
+    if (remote && file->remotePerm) {
+        _remotePerms[item._file] = file->remotePerm;
+    }
+
     switch(file->error_status) {
     case CSYNC_STATUS_OK:
         break;
@@ -399,10 +403,6 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote )
 
     _syncedItems.append(item);
 
-    if (remote && file->remotePerm) {
-        _remotePerms[item._file] = file->remotePerm;
-    }
-
     emit syncItemDiscovered(item);
     return re;
 }
@@ -882,7 +882,6 @@ void SyncEngine::checkForPermission()
 
 QByteArray SyncEngine::getPermissions(const QString& file) const
 {
-    //FIXME;
     static bool isTest = qgetenv("OWNCLOUD_TEST_PERMISSIONS").toInt();
     if (isTest) {
         QRegExp rx("_PERM_([^_]*)_[^/]*$");

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