From ddb53416fcfe305a1ed719d3bf8dfbb84556f46f Mon Sep 17 00:00:00 2001 From: Dong Wang Date: Fri, 29 Aug 2025 00:50:10 +0800 Subject: [PATCH] Clear ec on successful permission operation --- src/operations.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/operations.cpp b/src/operations.cpp index 4f69b5565..c5ad4afd9 100644 --- a/src/operations.cpp +++ b/src/operations.cpp @@ -4379,6 +4379,9 @@ void permissions(path const& p, perms prms, system::error_code* ec) if ((prms & add_perms) && (prms & remove_perms)) // precondition failed return; + if (ec) + ec->clear(); + #if defined(BOOST_FILESYSTEM_USE_WASI) emit_error(BOOST_ERROR_NOT_SUPPORTED, p, ec, "boost::filesystem::permissions"); #elif defined(BOOST_POSIX_API)