From 61419cf717ef4087358fe82160f8d806d04fde97 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Fri, 23 Aug 2024 10:03:04 -0400 Subject: [PATCH] LibCore: Silently ignore IN_IGNORED events According to the inotify man page, this event is always generated after a IN_DELETE, which we separately handle. Just ignore IN_IGNORED events to avoid spamming stderr. --- Userland/Libraries/LibCore/FileWatcherLinux.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/Libraries/LibCore/FileWatcherLinux.cpp b/Userland/Libraries/LibCore/FileWatcherLinux.cpp index 69f8d5e1c88..0aaade3d56e 100644 --- a/Userland/Libraries/LibCore/FileWatcherLinux.cpp +++ b/Userland/Libraries/LibCore/FileWatcherLinux.cpp @@ -74,6 +74,8 @@ static Optional get_event_from_fd(int fd, HashMapmask & IN_ATTRIB) != 0) result.type |= FileWatcherEvent::Type::MetadataModified; + if ((event->mask & IN_IGNORED) != 0) + return {}; if (result.type == FileWatcherEvent::Type::Invalid) { warnln("Unknown event type {:x} returned by the watch_file descriptor for {}", event->mask, path);