Ticket #15051 (closed defect: fixed)
wxFileSystemWatcher: Transient directories may provoke a wxLogError
| Reported by: | dghart | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | base | Version: | 2.9-svn |
| Keywords: | wxFileSystemWatcher wxLogError | Cc: | |
| Blocked By: | Patch: | yes | |
| Blocking: |
Description
The tests run by e.g. the wx configure script create various dirs called conf*.dir, then quickly delete them again. If an app is watching the build dir with wxFileSystemWatcher, it receives the wxFSW_EVENT_CREATE and tries to add a watch for the new dir. There is then a race between the call to wxFileSystemWatcherBase::Add and the rmdir call. For me, that race is lost 2 or 3 times when I try to run configure. This doesn't in itself matter: there's no need to watch the dead dirs anyway. However wxFileSystemWatcherBase::Add (over)reacts by firing a wxLogError dialog for each failure.
I don't know what you'll feel the best response should be. Sending a wxFSW_EVENT_WARNING would be easy and informative, but slightly misleading as it's not actually coming from an inotify event. Perhaps just a wxLogDebug, or even a wxLogTrace; anything invisible to the user. I'll provide a patch once the decision has been made.

