Re: [Boost-bugs] [Boost C++ Libraries] #5403: filesystem3::recursive_directory_iterator::increment(system::error_code& ec) unexpected behaviour

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5403: filesystem3::recursive_directory_iterator::increment(system::error_code& ec) unexpected behaviour
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-04-12 05:39:04


#5403: filesystem3::recursive_directory_iterator::increment(system::error_code&
ec) unexpected behaviour
--------------------------------------+-------------------------------------
  Reporter: ttan@… | Owner: bemandawes
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: filesystem
   Version: Boost Development Trunk | Severity: Showstopper
Resolution: | Keywords: recursive_directory_iterator increment
--------------------------------------+-------------------------------------

Comment (by ttan@…):

 Further debug shows in file operations.hpp
 {{{
 void recur_dir_itr_imp::increment(system::error_code* ec)
 {
 //...skipped
           m_stack.push(directory_iterator(m_stack.top()->path(), *ec));
 //... skipped
 }
 }}}

 an directory_iterator object would be inserted into m_stack even when
 ec!=0, but m_level is '''''not''''' incremented in this case. This seems
 to be a bug beccause

 In another place in
 {{{
     void recur_dir_itr_imp::pop()
 }}}
 m_level is eppected to be incremented, and asserts if not.

 The above attached patch increments m_level in increment() and solves this
 problem.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5403#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:06 UTC