]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/fswatcher.cpp
simplify code so it always returns the same object
[wxWidgets.git] / src / msw / fswatcher.cpp
index 69c19e19b728644705a481fb14aa1a738faf5218..1c33ebac6e7d4b7f04f09231c6eeae817c2bca00 100644 (file)
@@ -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);
+            }
         }
     }
 }