[Pkg-owncloud-commits] [owncloud-client] 245/470: Fix the SocketApi status of CSYNC_FILE_SILENTLY_EXCLUDED files

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu May 12 16:25:09 UTC 2016


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 2c0caf8b75ea048c942bc7507027ff9f26bffcd7
Author: Jocelyn Turcotte <jturcotte at woboq.com>
Date:   Wed Mar 30 12:10:51 2016 +0200

    Fix the SocketApi status of CSYNC_FILE_SILENTLY_EXCLUDED files
    
    Bring back the hardcoded status logic for excluded files.
    Since the activity log doesn't even mention those files on purpose,
    we can't rely on the SyncEngine to notify us about the status of those files.
---
 src/libsync/syncfilestatustracker.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/libsync/syncfilestatustracker.cpp b/src/libsync/syncfilestatustracker.cpp
index 61ebcfb..72076c9 100644
--- a/src/libsync/syncfilestatustracker.cpp
+++ b/src/libsync/syncfilestatustracker.cpp
@@ -86,6 +86,15 @@ SyncFileStatus SyncFileStatusTracker::fileStatus(const QString& systemFileName)
         qDebug() << "Removed trailing slash: " << fileName;
     }
 
+    // The SyncEngine won't notify us at all for CSYNC_FILE_SILENTLY_EXCLUDED
+    // and CSYNC_FILE_EXCLUDE_AND_REMOVE excludes. Even though it's possible
+    // that the status of CSYNC_FILE_EXCLUDE_LIST excludes will change if the user
+    // update the exclude list at runtime and doing it statically here removes
+    // our ability to notify changes through the fileStatusChanged signal,
+    // it's an acceptable compromize to treat all exclude types the same.
+    if( _syncEngine->excludedFiles().isExcluded(_syncEngine->localPath() + fileName, _syncEngine->localPath(), _syncEngine->ignoreHiddenFiles()) )
+        return SyncFileStatus(SyncFileStatus::StatusWarning);
+
     SyncFileItem* item = _syncEngine->findSyncItem(fileName);
     if (item)
         return fileStatus(*item);

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