[Bug libstdc++/99290] std::filesystem::copy does not always report errors for recursion

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jun 14 19:20:23 GMT 2022


--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jonathan Wakely


commit r10-10833-g43cbff3da5a856d1b18a9ad33b337ab829af73ed
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Apr 28 13:06:31 2022 +0100

    libstdc++: Fix error reporting in filesystem::copy [PR99290]

    The recursive calls to filesystem::copy should stop if any of them
    reports an error.


            PR libstdc++/99290
            * src/c++17/fs_ops.cc (fs::copy): Pass error_code to
            directory_iterator constructor, and check on each iteration.
            * src/filesystem/ops.cc (fs::copy): Likewise.
            * testsuite/27_io/filesystem/operations/copy.cc: Check for
            errors during recursion.
            * testsuite/experimental/filesystem/operations/copy.cc:

    (cherry picked from commit 4e117418fb71f508c479e0144500f4da9cc92520)

More information about the Gcc-bugs mailing list