[Boost-bugs] [Boost C++ Libraries] #5653: recursive_directory_iterator(error_code) can still throw filesystem_error

Subject: [Boost-bugs] [Boost C++ Libraries] #5653: recursive_directory_iterator(error_code) can still throw filesystem_error
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-06-28 12:10:09


#5653: recursive_directory_iterator(error_code) can still throw filesystem_error
---------------------------------------------+------------------------------
 Reporter: Geurt Vos <geurt.vos@…> | Owner: bemandawes
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: filesystem
  Version: Boost 1.46.1 | Severity: Problem
 Keywords: |
---------------------------------------------+------------------------------
 internally recursive_directory_iterator uses other filesystem facilities
 (such as is_directory and is_symlink) without passing the
 system::error_code argument. If they fail, they will throw
 filesystem_error.

 Example on Linux (see ticket #5652):

 int main()
 {
     try {
         error_code ec;
         for (recursive_directory_iterator i(".", ec); i !=
 recursive_directory_iterator(); ++i) ;
     }
     catch (const std::exception& e) {
         std::cout << ">> " << e.what() << std::endl;
     }
 }

 $ ln -s mybadlink mybadlink
 $ ./test
>> boost::filesystem::status: Too many levels of symbolic links:
 "./mybadlink"

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5653>
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