forked from gcc-mirror/gcc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263922 138bc75d-0d04-0410-961f-82ee72b054a4
- Loading branch information
redi
committed
Aug 28, 2018
1 parent
70775f2
commit 79ec46f
Showing
3 changed files
with
88 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
2018-08-28 Jonathan Wakely <[email protected]> | ||
|
||
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. | ||
|
||
2018-08-25 Iain Sandoe <[email protected]> | ||
|
||
PR libstdc++/70694 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters