X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f8d371481626e3856dbe9696b781f19f7141f1b0..404b319a85dadd7decf7a5a5331020520031a41c:/src/msw/fswatcher.cpp?ds=sidebyside diff --git a/src/msw/fswatcher.cpp b/src/msw/fswatcher.cpp index 7f2bcd6e89..1c33ebac6e 100644 --- a/src/msw/fswatcher.cpp +++ b/src/msw/fswatcher.cpp @@ -136,7 +136,7 @@ void wxFSWatcherImplMSW::SendEvent(wxFileSystemWatcherEvent& evt) bool wxFSWatcherImplMSW::DoSetUpWatch(wxFSWatchEntryMSW& watch) { - BOOL bWatchSubtree wxDUMMY_INITIALIZE(FALSE); + BOOL bWatchSubtree = FALSE; switch ( watch.GetType() ) { @@ -316,8 +316,12 @@ void wxIOCPThread::ProcessNativeEvents(wxVector& 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); + } } } } @@ -431,7 +435,7 @@ wxMSWFileSystemWatcher::AddTree(const wxFileName& path, return false; } - return DoAdd(path, events, wxFSWPath_Tree); + return AddAny(path, events, wxFSWPath_Tree); } #endif // wxUSE_FSWATCHER