From 5658fac923b419df1f9a95f01b2a5c76737004b2 Mon Sep 17 00:00:00 2001 From: Zeno Albisser Date: Wed, 26 May 2010 13:15:41 +0200 Subject: make QFileSystemWatcher_win distinguish C: from C:\ Since we now support this in QFileInfo, we also need to support this in QFileSystemWatcher. Otherwise the changes in a watched root folder would not get detected. Reviewed-by: Joao Task-number: QTBUG-8241 --- src/corelib/io/qfilesystemwatcher_win.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/corelib/io/qfilesystemwatcher_win.cpp b/src/corelib/io/qfilesystemwatcher_win.cpp index 249ce0f..71df3c2 100644 --- a/src/corelib/io/qfilesystemwatcher_win.cpp +++ b/src/corelib/io/qfilesystemwatcher_win.cpp @@ -86,7 +86,8 @@ QStringList QWindowsFileSystemWatcherEngine::addPaths(const QStringList &paths, while (it.hasNext()) { QString path = it.next(); QString normalPath = path; - if ((normalPath.endsWith(QLatin1Char('/')) || normalPath.endsWith(QLatin1Char('\\'))) + if ((normalPath.endsWith(QLatin1Char('/')) && !normalPath.endsWith(QLatin1String(":/"))) + || (normalPath.endsWith(QLatin1Char('\\')) && !normalPath.endsWith(QLatin1String(":\\"))) #ifdef Q_OS_WINCE && normalPath.size() > 1) #else -- cgit v0.12