summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorZeno Albisser <zeno.albisser@nokia.com>2010-05-26 11:15:41 (GMT)
committerZeno Albisser <zeno.albisser@nokia.com>2010-05-27 09:04:14 (GMT)
commit5658fac923b419df1f9a95f01b2a5c76737004b2 (patch)
treea7e26504a024c13e120a9015bf2b29dd99667b95 /src/corelib/io
parentfa46fa236b5f4a9a5677da2e7464a6b9f8b7b5f3 (diff)
downloadQt-5658fac923b419df1f9a95f01b2a5c76737004b2.zip
Qt-5658fac923b419df1f9a95f01b2a5c76737004b2.tar.gz
Qt-5658fac923b419df1f9a95f01b2a5c76737004b2.tar.bz2
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
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qfilesystemwatcher_win.cpp3
1 files changed, 2 insertions, 1 deletions
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