]> gcc.gnu.org Git - gcc.git/commit
libstdc++: Fix error reporting in filesystem::copy [PR99290]
authorJonathan Wakely <jwakely@redhat.com>
Thu, 28 Apr 2022 12:06:31 +0000 (13:06 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 28 Apr 2022 17:04:27 +0000 (18:04 +0100)
commit9821d286bce3edf1d36168f129bfc7fe99c15fc3
treed41ccbe3ff0c270e7939c5b37f8954a73f4c7407
parent8969d00bf16a8f4de79306010fca8f14f91c171d
libstdc++: Fix error reporting in filesystem::copy [PR99290]

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

libstdc++-v3/ChangeLog:

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:
Likewise.

(cherry picked from commit 4e117418fb71f508c479e0144500f4da9cc92520)
libstdc++-v3/src/c++17/fs_ops.cc
libstdc++-v3/src/filesystem/ops.cc
libstdc++-v3/testsuite/27_io/filesystem/operations/copy.cc
libstdc++-v3/testsuite/experimental/filesystem/operations/copy.cc
This page took 0.059583 seconds and 5 git commands to generate.