summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2018-06-06 19:42:42 -0700
committerThiago Macieira <thiago.macieira@intel.com>2018-06-07 17:21:55 +0000
commitf7c8a991c300f99da808ef2657b16a976c1dfc7a (patch)
tree36cb136f82b30291cda919fd90d0218d73ac6718 /src
parent9551d62d97c15a74f257df2219d719264ff9e68c (diff)
QFileSystemWatcher/Linux: don't print warnings for benign cases
ENOENT (no such file or directory) is a benign error, since it could happen also out of a race condition. All the other errors in the inotify_add_watch(2) man page indicate bugs in Qt or resource exhaustion, so those remain being printed. Task-number: QTBUG-68586 Change-Id: I04b94079b6da48f39a82fffd1535c08d8a3d8c33 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qfilesystemwatcher_inotify.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/io/qfilesystemwatcher_inotify.cpp b/src/corelib/io/qfilesystemwatcher_inotify.cpp
index 048669b92f..c0c5f9d744 100644
--- a/src/corelib/io/qfilesystemwatcher_inotify.cpp
+++ b/src/corelib/io/qfilesystemwatcher_inotify.cpp
@@ -302,7 +302,8 @@ QStringList QInotifyFileSystemWatcherEngine::addPaths(const QStringList &paths,
| IN_DELETE_SELF
)));
if (wd < 0) {
- qWarning().nospace() << "inotify_add_watch(" << path << ") failed: " << QSystemError(errno, QSystemError::NativeError).toString();
+ if (errno != ENOENT)
+ qErrnoWarning("inotify_add_watch(%ls) failed:", path.constData());
continue;
}