mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-24 05:15:40 +03:00
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.
This commit is contained in:
parent
02704cdf74
commit
e19214c3c4
1 changed files with 4 additions and 5 deletions
|
@ -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_([^_]*)_[^/]*$");
|
||||
|
|
Loading…
Reference in a new issue