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.
This commit is contained in:
Timothy Flynn 2024-08-23 10:03:04 -04:00 committed by Andreas Kling
parent 49733ed09b
commit 61419cf717
Notes: github-actions[bot] 2024-08-25 07:49:16 +00:00

View file

@ -74,6 +74,8 @@ static Optional<FileWatcherEvent> get_event_from_fd(int fd, HashMap<unsigned, By
result.type |= FileWatcherEvent::Type::ContentModified;
if ((event->mask & 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);