aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2018-08-28 16:33:53 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2018-08-28 16:33:53 +0100
commitdd35da2cbef6d8bf9db86d7e66faeebb5022c881 (patch)
tree4a236cb188b846308f29b7524e0686eb729df251 /gcc
parentf30bafb7fcf78e1472cb6cadc6e953d1586a0db3 (diff)
downloadgcc-dd35da2cbef6d8bf9db86d7e66faeebb5022c881.zip
gcc-dd35da2cbef6d8bf9db86d7e66faeebb5022c881.tar.gz
gcc-dd35da2cbef6d8bf9db86d7e66faeebb5022c881.tar.bz2
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
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions