r270962 - in /branches/gcc-8-branch/libstdc++-v...

redi@gcc.gnu.org redi@gcc.gnu.org
Tue May 7 15:46:00 GMT 2019


Author: redi
Date: Tue May  7 15:46:13 2019
New Revision: 270962

URL: https://gcc.gnu.org/viewcvs?rev=270962&root=gcc&view=rev
Log:
Fix directory_iterator handling of DT_UNKNOWN

We need to handle DT_UNKNOWN earlier, not only during directory
recursion, so that the cached file_type value in the directory_entry
won't be used.

Backport from mainline
2019-04-05  Jonathan Wakely  <jwakely@redhat.com>

	* src/filesystem/std-dir.cc (_Dir::advance(bool, error_code&)): Handle
	d_type == DT_UNKNOWN immediately.
	(_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
	handling here.
	* testsuite/27_io/filesystem/iterators/caching.cc: New test.

Added:
    branches/gcc-8-branch/libstdc++-v3/testsuite/27_io/filesystem/iterators/caching.cc
Modified:
    branches/gcc-8-branch/libstdc++-v3/ChangeLog
    branches/gcc-8-branch/libstdc++-v3/src/filesystem/std-dir.cc



More information about the Libstdc++-cvs mailing list