mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-23 18:42:17 +01:00
Merge pull request #1319 from ObjSal/develop
Fixes an issue in DirectoryWatcher where it stops listening for events
This commit is contained in:
commit
cab7142a4e
@ -108,7 +108,20 @@ protected:
|
||||
DirectoryIterator end;
|
||||
while (it != end)
|
||||
{
|
||||
entries[it.path().getFileName()] = ItemInfo(*it);
|
||||
// DirectoryWatcher should not stop watching if it fails to get the info
|
||||
// of a file, it should just ignore it.
|
||||
try
|
||||
{
|
||||
entries[it.path().getFileName()] = ItemInfo(*it);
|
||||
}
|
||||
catch(const Poco::FileNotFoundException& fnfe)
|
||||
{
|
||||
// The file is missing, remove it from the entries so it is treated as
|
||||
// deleted.
|
||||
entries.erase(it.path().getFileName());
|
||||
|
||||
poco_unexpected();
|
||||
}
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user