[libcxx-commits] [libcxx] [libcxx] Correct and clean-up filesystem operations error_code paths (PR #88341)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 12 09:11:29 PDT 2024


================
@@ -166,15 +163,15 @@ void __copy(const path& from, const path& to, copy_options options, error_code*
       return;
     }
     error_code m_ec2;
-    for (; it != directory_iterator(); it.increment(m_ec2)) {
-      if (m_ec2) {
-        return err.report(m_ec2);
-      }
+    for (; !m_ec2 && it != directory_iterator(); it.increment(m_ec2)) {
----------------
ldionne wrote:

Ok, I see it now, thanks!

https://github.com/llvm/llvm-project/pull/88341


More information about the libcxx-commits mailing list