From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7A0763850851; Tue, 14 Jun 2022 19:20:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7A0763850851 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/99290] std::filesystem::copy does not always report errors for recursion Date: Tue, 14 Jun 2022 19:20:23 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2022 19:20:23 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99290 --- Comment #6 from CVS Commits --- The releases/gcc-10 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:43cbff3da5a856d1b18a9ad33b337ab829af73ed commit r10-10833-g43cbff3da5a856d1b18a9ad33b337ab829af73ed Author: Jonathan Wakely 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. 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)=