r270172 - in /trunk/libstdc++-v3: ChangeLog src...

redi@gcc.gnu.org redi@gcc.gnu.org
Fri Apr 5 16:56:00 GMT 2019


Author: redi
Date: Fri Apr  5 16:56:18 2019
New Revision: 270172

URL: https://gcc.gnu.org/viewcvs?rev=270172&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.

	* src/c++17/fs_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:
    trunk/libstdc++-v3/testsuite/27_io/filesystem/iterators/caching.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/src/c++17/fs_dir.cc



More information about the Libstdc++-cvs mailing list