Opened 11 years ago
Closed 6 years ago
#6557 closed Bugs (fixed)
directory_iterator_increment fails to throw exception
Reported by: | anonymous | Owned by: | Beman Dawes |
---|---|---|---|
Milestone: | To Be Determined | Component: | filesystem |
Version: | Boost 1.48.0 | Severity: | Problem |
Keywords: | Cc: |
Description
When trying to construct a directory_iterator from a location that doesn't exist anymore, no exception is thrown.
This code in directory_iterator_increment fails:
if (temp_ec)
{
it.m_imp.reset(); if (ec == 0)
BOOST_FILESYSTEM_THROW(
filesystem_error("boost::filesystem::directory_iterator::operator++",
it.m_imp->dir_entry.path().parent_path(), error_code(BOOST_ERRNO, system_category())));
ec->assign(BOOST_ERRNO, system_category()); return;
}
it.m_imp is first reset and then used while trying to throw an exception.
Change History (2)
comment:1 by , 11 years ago
comment:2 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Fixed in http://svn.boost.org/svn/boost/trunk/libs/filesystem/src/operations.cpp (an shipped in boost 1.49)