You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all - finally one working impl. Great job!
Describe the bug
copy and remove_all with error_code throws exceptions due to the error code not being propagated to the directory_iterator's constructor when iterating over the files.
for (const directory_entry& x : directory_iterator(from)) {
for (const directory_entry& de : directory_iterator(p)) {
shoud be
for (const directory_entry& x : directory_iterator(from, ec)) {
for (const directory_entry& de : directory_iterator(p, ec)) {
Expected behavior
These should not throw when using the error_code api
The text was updated successfully, but these errors were encountered:
Okay, I didn't run the tests on all my platforms yet (just fixed it from a macOS machine), but the fix is not complex, so I guess it will compile and work, and I will run tests on the other systems soon.
The next regular release v1.0.6 with the fix is scheduled for the upcomming weekend.
Actually even that fix is not enough. After more digging, another problem is actually using the error_code variant of directory_iterator in a range-based for loop, as it calls operator++ and that is not exception-free. Working on a fix. Need to use an explicit loop for guaranteed exception safety.
First of all - finally one working impl. Great job!
Describe the bug
copy and remove_all with error_code throws exceptions due to the error code not being propagated to the directory_iterator's constructor when iterating over the files.
shoud be
Expected behavior
These should not throw when using the error_code api
The text was updated successfully, but these errors were encountered: