Don't watch directories recursively in wxMSW wxFileSystemWatcher.

MSW implementation of this class always watched the added entries recursively,
i.e. always behaved as if the entry to watch was added using AddTree().

Fix this simply by not asking ::ReadDirectoryChangesW() to watch the entire
subtree.

See #12847.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67692 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-05-03 23:31:35 +00:00
parent 51fb867819
commit 4610ad4ecb

View File

@@ -138,7 +138,7 @@ bool wxFSWatcherImplMSW::DoSetUpWatch(wxFSWatchEntryMSW& watch)
{
int flags = Watcher2NativeFlags(watch.GetFlags());
int ret = ReadDirectoryChangesW(watch.GetHandle(), watch.GetBuffer(),
wxFSWatchEntryMSW::BUFFER_SIZE, TRUE,
wxFSWatchEntryMSW::BUFFER_SIZE, FALSE,
flags, NULL,
watch.GetOverlapped(), NULL);
if (!ret)