X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ff534ba469473a9ace193e736ca131144df307f9..931d6a47c32a5b4c283243cb553ce71ee2b535d5:/src/msw/fswatcher.cpp diff --git a/src/msw/fswatcher.cpp b/src/msw/fswatcher.cpp index a186acd2ca..7546f03a48 100644 --- a/src/msw/fswatcher.cpp +++ b/src/msw/fswatcher.cpp @@ -3,7 +3,6 @@ // Purpose: wxMSWFileSystemWatcher // Author: Bartosz Bekier // Created: 2009-05-26 -// RCS-ID: $Id$ // Copyright: (c) 2009 Bartosz Bekier // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -316,8 +315,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 +434,7 @@ wxMSWFileSystemWatcher::AddTree(const wxFileName& path, return false; } - return DoAdd(path, events, wxFSWPath_Tree); + return AddAny(path, events, wxFSWPath_Tree); } #endif // wxUSE_FSWATCHER