]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/fswatcher.cpp
Set missing Language: headers in PO files.
[wxWidgets.git] / src / msw / fswatcher.cpp
index 7f2bcd6e8901e465d1d8c81b8911c7ba6c9de0de..7546f03a480dc1237f8f099ebfd0e7fc54fa015f 100644 (file)
@@ -3,7 +3,6 @@
 // Purpose:     wxMSWFileSystemWatcher
 // Author:      Bartosz Bekier
 // Created:     2009-05-26
-// RCS-ID:      $Id$
 // Copyright:   (c) 2009 Bartosz Bekier <bartosz.bekier@gmail.com>
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -136,7 +135,7 @@ void wxFSWatcherImplMSW::SendEvent(wxFileSystemWatcherEvent& evt)
 
 bool wxFSWatcherImplMSW::DoSetUpWatch(wxFSWatchEntryMSW& watch)
 {
-    BOOL bWatchSubtree wxDUMMY_INITIALIZE(FALSE);
+    BOOL bWatchSubtree = FALSE;
 
     switch ( watch.GetType() )
     {
@@ -316,8 +315,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);
+            }
         }
     }
 }
@@ -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