[Bug libstdc++/88881] std::filesystem::status gives bad results on mingw32

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jul 22 07:07:36 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88881

--- Comment #26 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:

https://gcc.gnu.org/g:66e876a91b5d5c1a0c5067f2d8f1d531da3a81f8

commit r11-10161-g66e876a91b5d5c1a0c5067f2d8f1d531da3a81f8
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Jun 28 15:56:30 2022 +0100

    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.

    (cherry picked from commit 6c96b14a19a9e6c365eacc59868a866b99f9786d)


More information about the Gcc-bugs mailing list