Fix wxFileSystemWatcher::RemoveAll() to actually work.

We need to call DoRemove() on all watcher objects to really remove them, just
removing our record of them was not enough and e.g. resulted in errors if we
tried to re-add a previously watched path again.

Closes #15531.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76182 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-03-23 00:10:36 +00:00
parent ddf01fe77f
commit 37024c991c
4 changed files with 37 additions and 4 deletions

View File

@@ -84,8 +84,16 @@ public:
virtual bool RemoveAll()
{
bool ret = true;
for ( wxFSWatchEntries::iterator it = m_watches.begin();
it != m_watches.end();
++it )
{
if ( !DoRemove(it->second) )
ret = false;
}
m_watches.clear();
return true;
return ret;
}
// Check whether any filespec matches the file's ext (if present)