]> gcc.gnu.org Git - gcc.git/commit
libstdc++: Fix experimental::filesystem::status on Windows [PR88881]
authorJonathan Wakely <jwakely@redhat.com>
Tue, 28 Jun 2022 14:56:30 +0000 (15:56 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 30 Jun 2022 13:16:06 +0000 (14:16 +0100)
commit6c96b14a19a9e6c365eacc59868a866b99f9786d
tree7d80b214df5310faec35fc1ca6d14c0c2504e2f3
parentfa22c9c7a979655efaff888138107324afc510c5
libstdc++: Fix experimental::filesystem::status on Windows [PR88881]

Although the Filesystem TS isn't properly supported on Windows (unlike
the C++17 Filesystem lib), most tests do pass. Two of the failures are
due to PR 88881 which was only fixed for std::filesystem not the TS.
This applies the fix to the TS implementation too.

libstdc++-v3/ChangeLog:

PR libstdc++/88881
* src/filesystem/ops.cc (has_trailing_slash): New helper
function.
(fs::status): Strip trailing slashes.
(fs::symlink_status): Likewise.
* testsuite/experimental/filesystem/operations/temp_directory_path.cc:
Clean the environment before each test and use TMP instead of
TMPDIR so the test passes on Windows.
libstdc++-v3/src/filesystem/ops.cc
libstdc++-v3/testsuite/experimental/filesystem/operations/temp_directory_path.cc
This page took 0.056291 seconds and 5 git commands to generate.