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:
@@ -89,6 +89,12 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check whether any filespec matches the file's ext (if present)
|
||||
bool MatchesFilespec(const wxFileName& fn, const wxString& filespec) const
|
||||
{
|
||||
return filespec.empty() || wxMatchWild(filespec, fn.GetFullName());
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual bool DoAdd(wxSharedPtr<wxFSWatchEntry> watch) = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user