Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Molkentin <danimo@owncloud.com>2014-12-02 15:37:22 +0300
committerDaniel Molkentin <danimo@owncloud.com>2014-12-02 15:37:22 +0300
commit3016844dd7a2889ef8a24e6e3352b060907f439d (patch)
tree92dc48f91db231fc341aa3f4d1b7a5e3ae33d398 /src/gui/folderwatcher_linux.cpp
parent281c0e155348c5e1da2d08f3147107d0bc32ff9f (diff)
parent3f5887cc0305c9d5d6824604a1aabdda4f36b727 (diff)
Merge branch 'master' into rename_client
Conflicts: README.md src/gui/folderman.cpp src/gui/settingsdialog.cpp src/libsync/accessmanager.cpp src/libsync/propagateupload.h
Diffstat (limited to 'src/gui/folderwatcher_linux.cpp')
-rw-r--r--src/gui/folderwatcher_linux.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/gui/folderwatcher_linux.cpp b/src/gui/folderwatcher_linux.cpp
index 0bb0e18cf..e8f280b34 100644
--- a/src/gui/folderwatcher_linux.cpp
+++ b/src/gui/folderwatcher_linux.cpp
@@ -159,23 +159,22 @@ void FolderWatcherPrivate::slotReceivedNotification(int fd)
while(i + sizeof(struct inotify_event) < static_cast<unsigned int>(len)) {
// cast an inotify_event
event = (struct inotify_event*)&buffer[i];
- // with the help of watch descriptor, retrieve, corresponding INotify
if (event == NULL) {
qDebug() << "NULL event";
i += sizeof(struct inotify_event);
continue;
}
- // fire event
- // Note: The name of the changed file and stuff could be taken from
- // the event data structure. That does not happen yet.
+ // Fire event for the path that was changed.
if (event->len > 0 && event->wd > -1) {
+ QByteArray fileName(event->name);
// qDebug() << Q_FUNC_INFO << event->name;
- if (QByteArray(event->name).startsWith(".csync") ||
- QByteArray(event->name).startsWith(".owncloudsync.log")) {
+ if (fileName.startsWith(".csync_journal.db") ||
+ fileName.startsWith(".owncloudsync.log")) {
// qDebug() << "ignore journal";
} else {
- const QString p = _watches[event->wd];
+ const QString p = _watches[event->wd] + '/' + fileName;
+ //qDebug() << "found a change in " << p;
_parent->changeDetected(p);
}
}