[Pkg-owncloud-commits] [owncloud-client] 310/470: Fix hidden file handling #4655

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu May 12 16:25:18 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 6f454feb391b2ef4f0f7bcf3416bb3b14469b3f4
Author: Christian Kamm <mail at ckamm.de>
Date:   Tue Apr 12 11:49:52 2016 +0200

    Fix hidden file handling #4655
    
    There were two issues:
    
    * With the refactoring of how Folder and SyncEngine relate, the
      ignore_hidden_files flag on the CSync context was reset after
      each sync run and not updated from the configuration again.
    
    * The folder watcher failed to enumerate hidden folders and thus
      didn't watch for changes inside them. (linux only)
---
 csync/src/csync.c               | 1 -
 src/gui/folder.cpp              | 2 ++
 src/gui/folderwatcher_linux.cpp | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/csync/src/csync.c b/csync/src/csync.c
index cd3aa36..e6c9ad0 100644
--- a/csync/src/csync.c
+++ b/csync/src/csync.c
@@ -548,7 +548,6 @@ int csync_commit(CSYNC *ctx) {
   ctx->remote.read_from_db = 0;
   ctx->read_remote_from_db = true;
   ctx->db_is_empty = false;
-  ctx->ignore_hidden_files = true; // do NOT sync hidden files by default.
 
 
   /* Create new trees */
diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp
index c3097c9..6ab67cb 100644
--- a/src/gui/folder.cpp
+++ b/src/gui/folder.cpp
@@ -753,6 +753,8 @@ void Folder::startSync(const QStringList &pathList)
     quint64 limit = newFolderLimit.first ? newFolderLimit.second * 1000 * 1000 : -1; // convert from MB to B
     _engine->setNewBigFolderSizeLimit(limit);
 
+    _engine->setIgnoreHiddenFiles(_definition.ignoreHiddenFiles);
+
     QMetaObject::invokeMethod(_engine.data(), "startSync", Qt::QueuedConnection);
 
     // disable events until syncing is done
diff --git a/src/gui/folderwatcher_linux.cpp b/src/gui/folderwatcher_linux.cpp
index 59e59aa..e3c00a4 100644
--- a/src/gui/folderwatcher_linux.cpp
+++ b/src/gui/folderwatcher_linux.cpp
@@ -58,7 +58,7 @@ bool FolderWatcherPrivate::findFoldersBelow( const QDir& dir, QStringList& fullL
     } else {
         QStringList nameFilter;
         nameFilter << QLatin1String("*");
-        QDir::Filters filter = QDir::Dirs | QDir::NoDotAndDotDot|QDir::NoSymLinks;
+        QDir::Filters filter = QDir::Dirs | QDir::NoDotAndDotDot | QDir::NoSymLinks | QDir::Hidden;
         const QStringList pathes = dir.entryList(nameFilter, filter);
 
         QStringList::const_iterator constIterator;

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