Opened 11 years ago

Closed 11 years ago

#6558 closed Bugs (duplicate)

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 (1)

comment:1 by Marshall Clow, 11 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #6557

Note: See TracTickets for help on using tickets.