gcc/libstdc++-v3/src
Jonathan Wakely dd35da2cbe PR libstdc++/87116 fix path::lexically_normal() handling of dot-dot
Previously the logic that turned "a/b/c/../.." into "a/" failed to
preserve an empty path at the end of the iteration sequence, as required
by the trailing slash. That meant the result didn't meet the class
invariants, and that "a/b/c/d/../../.." would remove four components
instead of the three that "../../.." should remove.

	PR libstdc++/87116
	* src/filesystem/std-path.cc (path::lexically_normal): When handling
	a dot-dot filename, preserve an empty final component in the iteration
	sequence.
	[_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use preferred-separator for
	root-directory.
	* testsuite/27_io/filesystem/path/generation/normal.cc: Add new tests
	for more than two adjacent dot-dot filenames.
	[_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Replace slashes with
	preferred-separator in expected normalized strings.

From-SVN: r263922
2018-08-28 16:33:53 +01:00
..
c++11 Fix bootstrap with --enable-fully-dynamic-string 2018-08-16 16:56:21 +01:00
c++17 Fix single-threaded build for targets without atomics 2018-08-15 10:56:33 +01:00
c++98 PR libstdc++/85343 overload __throw_ios_failure to take errno 2018-08-14 13:09:57 +01:00
filesystem PR libstdc++/87116 fix path::lexically_normal() handling of dot-dot 2018-08-28 16:33:53 +01:00
shared Update copyright years. 2018-01-03 11:03:58 +01:00
Makefile.am Add new src/c++17 directory to list in acinclude.m4 2018-07-25 12:01:39 +01:00
Makefile.in Add initial version of C++17 <memory_resource> header 2018-07-24 22:09:55 +01:00