Skip to content

Commit ddb5341

Browse files
committed
Clear ec on successful permission operation
1 parent 0a2374f commit ddb5341

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/operations.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4379,6 +4379,9 @@ void permissions(path const& p, perms prms, system::error_code* ec)
43794379
if ((prms & add_perms) && (prms & remove_perms)) // precondition failed
43804380
return;
43814381

4382+
if (ec)
4383+
ec->clear();
4384+
43824385
#if defined(BOOST_FILESYSTEM_USE_WASI)
43834386
emit_error(BOOST_ERROR_NOT_SUPPORTED, p, ec, "boost::filesystem::permissions");
43844387
#elif defined(BOOST_POSIX_API)

0 commit comments

Comments
 (0)