[Pkg-owncloud-commits] [owncloud-client] 124/332: Permissions: Consider and empty remotePerms from csync as NULL

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 b735dc07d6b8f1ba277a84984ce640ffe92bd26e
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Mon Jun 23 15:05:48 2014 +0200

    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 b65d075..6352d4d 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;
     }
 

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