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>
This commit is contained in:
parent
9551d62d97
commit
f7c8a991c3
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user