Fix error handling in recursive_directory_iterator::increment
authorJonathan Wakely <jwakely@redhat.com>
Wed, 26 Oct 2016 13:34:34 +0000 (14:34 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 26 Oct 2016 13:34:34 +0000 (14:34 +0100)
commitb4e7e6bf229664045926633aae90a287e39f6454
tree2b9f8999fa61bd811f60c2f4187322c6b71fcc43
parent09844a5f640d7e881f503859953925ae260a2be8
Fix error handling in recursive_directory_iterator::increment

* src/filesystem/dir.cc (recursive_directory_iterator::increment):
Reset state on error.
* testsuite/experimental/filesystem/iterators/
recursive_directory_iterator.cc: Check state after increment error.

From-SVN: r241552
libstdc++-v3/ChangeLog
libstdc++-v3/src/filesystem/dir.cc
libstdc++-v3/testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc