From b735dc07d6b8f1ba277a84984ce640ffe92bd26e Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 23 Jun 2014 15:05:48 +0200 Subject: [PATCH] Permissions: Consider and empty remotePerms from csync as NULL Since remotePerm from csync is never NULL (as it is a buffer), we consider that if it is empty, there was no permission set (and therefore everything is allowed) csync will put a space in the permission if any permission was set --- src/mirall/syncengine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mirall/syncengine.cpp b/src/mirall/syncengine.cpp index b65d075c6..6352d4d00 100644 --- a/src/mirall/syncengine.cpp +++ b/src/mirall/syncengine.cpp @@ -273,14 +273,14 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote ) if (file->directDownloadCookies) { item._directDownloadCookies = QString::fromUtf8( file->directDownloadCookies ); } - if (file->remotePerm) { + if (file->remotePerm && file->remotePerm[0]) { item._remotePerm = QByteArray(file->remotePerm); } // record the seen files to be able to clean the journal later _seenFiles.insert(item._file); - if (remote && file->remotePerm) { + if (remote && file->remotePerm && file->remotePerm[0]) { _remotePerms[item._file] = file->remotePerm; }