X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dab61056c8ed77bc386728842bab187db1a7cce2..7bc740719c93355e447db5c9bcb24cf7cdc29b61:/src/unix/fswatcher_inotify.cpp diff --git a/src/unix/fswatcher_inotify.cpp b/src/unix/fswatcher_inotify.cpp index f23f4439e3..4801a2f708 100644 --- a/src/unix/fswatcher_inotify.cpp +++ b/src/unix/fswatcher_inotify.cpp @@ -250,11 +250,26 @@ protected: } else { - wxFAIL_MSG("Event for unknown watch descriptor."); + // In theory we shouldn't reach here. In practice, some + // events, e.g. IN_MODIFY, arrive just after the IN_IGNORED + // so their wd has already been discarded. Warn about them. + wxFileSystemWatcherEvent + event + ( + wxFSW_EVENT_WARNING, + wxString::Format + ( + _("Unexpected event for \"%s\": no " + "matching watch descriptor."), + inevt.len ? inevt.name : "" + ) + ); + SendEvent(event); + } // In any case, don't process this event: it's either for an - // already removed entry, or for a completely unknown one. + // already removed entry, or for an unknown one. return; } }