From 4ade023b96ef3ed0a07c2fda12da2c230e552d34 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 4 Feb 2014 16:45:43 +0100 Subject: [PATCH] Find another way to ignore the csync journal from the file watcher --- src/mirall/folderwatcher_linux.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mirall/folderwatcher_linux.cpp b/src/mirall/folderwatcher_linux.cpp index 6f008201d8..a8d522e9b5 100644 --- a/src/mirall/folderwatcher_linux.cpp +++ b/src/mirall/folderwatcher_linux.cpp @@ -173,7 +173,13 @@ void FolderWatcherPrivate::slotReceivedNotification(int fd) // Note: The name of the changed file and stuff could be taken from // the event data structure. That does not happen yet. if (event->len > 0 && event->wd > -1) { - _parent->changeDetected(QString::fromLocal8Bit(event->name)); + qDebug() << Q_FUNC_INFO << event->name; + if (QByteArray(event->name).startsWith(".csync")) { + qDebug() << "ignore journal"; + } else { + const QString p = _watches[event->wd]; + _parent->changeDetected(p); + } } // increment counter