summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorMikhail Svetkin <mikhail.svetkin@qt.io>2018-05-16 15:36:49 +0200
committerMikhail Svetkin <mikhail.svetkin@qt.io>2018-05-29 06:32:46 +0000
commit6b98d9767022465d2ee239fe023b2ceb67d36911 (patch)
tree09c772cc4bcf2ad83c6b76c508a837215d0f304b /src/corelib
parent42e4a6531d89601499e5d3d419216a4bbacf6670 (diff)
macOS: Fix QFileSystemWatcher to watch paths with the same prefix
It happens because our filesystemwatcher thinks it is subdirectory and not two different paths Task-number: QTBUG-60676 Change-Id: Ic753e9481cb26303a030044e0a5ab4d703bc529f Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qfilesystemwatcher_fsevents.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qfilesystemwatcher_fsevents.mm b/src/corelib/io/qfilesystemwatcher_fsevents.mm
index 792ea387ac..0254d0f7a1 100644
--- a/src/corelib/io/qfilesystemwatcher_fsevents.mm
+++ b/src/corelib/io/qfilesystemwatcher_fsevents.mm
@@ -377,7 +377,7 @@ QStringList QFseventsFileSystemWatcherEngine::addPaths(const QStringList &paths,
for (PathRefCounts::const_iterator i = watchingState.watchedPaths.begin(),
ei = watchingState.watchedPaths.end(); i != ei; ++i) {
- if (watchedPath.startsWith(i.key())) {
+ if (watchedPath.startsWith(i.key() % QDir::separator())) {
watchedPath = i.key();
break;
}