Check for filespec when generating events in wxFileSystemWatcher.
Instead of setting watches on individual files when a non-empty filespec is given, always watch all the files but just ignore the events from the ones not matching the filespec. This makes the code simpler and fixes several bugs. See #14544. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -316,8 +316,12 @@ void wxIOCPThread::ProcessNativeEvents(wxVector<wxEventProcessingData>& events)
|
||||
// CHECK I heard that returned path can be either in short on long
|
||||
// form...need to account for that!
|
||||
wxFileName path = GetEventPath(*watch, e);
|
||||
wxFileSystemWatcherEvent event(flags, path, path);
|
||||
SendEvent(event);
|
||||
// For files, check that it matches any filespec
|
||||
if ( m_service->MatchesFilespec(path, watch->GetFilespec()) )
|
||||
{
|
||||
wxFileSystemWatcherEvent event(flags, path, path);
|
||||
SendEvent(event);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user