Skip to content

Avoid reading non-regular files. - #295

Merged
boyter merged 1 commit into
boyter:masterfrom
alexet:fix-non-regular-files
Oct 11, 2021
Merged

boyter merged 1 commit into
boyter:masterfrom
alexet:fix-non-regular-files

Conversation

@alexet

@alexet alexet commented Oct 11, 2021

Copy link
Copy Markdown

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

boyter commented Oct 11, 2021

Copy link
Copy Markdown
Owner

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