From e19214c3c4ca2ee59836798a422331afceca6d66 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 23 Jun 2014 13:35:34 +0200 Subject: [PATCH] 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 562081a277..b65d075c6e 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_([^_]*)_[^/]*$");