Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid reading non-regular files. #295

Merged
merged 1 commit into from
Oct 11, 2021
Merged

Conversation

alexet
Copy link
Contributor

@alexet alexet commented Oct 11, 2021

If we try and read things like fifos we can block indefinitely trying to read. So we want to avoid reading them. Other non-regular files (other than directories and symlinks) are likely to also be weird in other ways.

As the code above this deals with symlinks and directories are expected to already be excluded I think skipping non-regular files is reasonable.

I couldn't get the tests to work on my machine before this change so I don't know if this passes them or not. There may be weird cases I haven't thought about that the tests cover.

@boyter boyter added the enhancement New feature or request label Oct 11, 2021
@boyter
Copy link
Owner

boyter commented Oct 11, 2021

Nice catch. Thanks for the submission.

Ill be looking into the test issues sometime soon once I get though some other things I am working on.

@boyter boyter merged commit b458dee into boyter:master Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants