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/trunk@76187 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-03-23 00:57:09 +00:00
parent 5b43c1858d
commit de22d0def4
3 changed files with 36 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)