Skip to content

std::fs::walk_dir never closes directories #25184

Closed
@clee

Description

@clee

I wrote a small utility to recursively parse time data from files in a given root directory, and when I try to run it on my $HOME it errors out with:

Error { repr: Os(24) }

According to the devs in #rust, this is the error code for 'too many open files'. After looking at the code for walk_dir, it looks like it never calls closedir, which would explain why this is happening for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions