copy and remove_all with error_code throws · Issue #4 · gulrak/filesystem · GitHub
Skip to content

copy and remove_all with error_code throws #4

Description

@unravel-dev

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingmediumSeverity: medium

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions