[Pkg-owncloud-commits] [owncloud-client] 26/120: FolderWatcher win: Skip unneeded notifications #3353
Sandro Knauß
hefee-guest at moszumanska.debian.org
Mon Aug 24 00:02:39 UTC 2015
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 0176ffd25d8cb27261d20946f2629c87ecdfc8cc
Author: Christian Kamm <mail at ckamm.de>
Date: Mon Aug 10 14:57:06 2015 +0200
FolderWatcher win: Skip unneeded notifications #3353
---
src/gui/folderwatcher_win.cpp | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/gui/folderwatcher_win.cpp b/src/gui/folderwatcher_win.cpp
index 4137ea0..f815b7c 100644
--- a/src/gui/folderwatcher_win.cpp
+++ b/src/gui/folderwatcher_win.cpp
@@ -87,8 +87,17 @@ void WatcherThread::watchChanges(size_t fileNotifyBufferSize,
}
longfile = QDir::cleanPath(longfile);
- qDebug() << Q_FUNC_INFO << "Found change in" << longfile << "action:" << curEntry->Action;
- emit changed(longfile);
+ // Skip modifications of folders: One of these is triggered for changes
+ // and new files in a folder, probably because of the folder's mtime
+ // changing. We don't need them.
+ bool skip = curEntry->Action == FILE_ACTION_MODIFIED
+ && QFileInfo(longfile).isDir();
+
+ if (!skip) {
+ //qDebug() << Q_FUNC_INFO << "Found change in" << longfile
+ // << "action:" << curEntry->Action;
+ emit changed(longfile);
+ }
if (curEntry->NextEntryOffset == 0) {
break;
--
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