Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

internal/fs: IsRegular returns an error on any non regular file #634

Merged
merged 1 commit into from
Jun 15, 2017
Merged

internal/fs: IsRegular returns an error on any non regular file #634

merged 1 commit into from
Jun 15, 2017

Conversation

davecheney
Copy link
Contributor

Updates #632

IsRegular would previously return true if any file that was not a
directory were presented. With this change IsRegular rejects any file
with a mode bit in the os.ModeType bitset--only regular files will pass
this test.

Updates #632

IsRegular would previously return true if any file that was _not_ a
directory were presented. With this change IsRegular rejects any file
with a mode bit in the os.ModeType bitset--only regular files will pass
this test.
Copy link
Collaborator

@jmank88 jmank88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, unless this warrants some new edge case tests as well.

@sdboyer
Copy link
Member

sdboyer commented May 24, 2017

The functionality here is obviously correct, so I'm not worried about testing for that. Some basic regression tests might not be a terrible thing to have.

More important, probably is, improving the godoc to more precisely describe the func's behavior.

@sdboyer
Copy link
Member

sdboyer commented May 31, 2017

bump - just some small changes here, then we can merge

@sdboyer sdboyer closed this Jun 13, 2017
@sdboyer sdboyer reopened this Jun 13, 2017
@sdboyer
Copy link
Member

sdboyer commented Jun 13, 2017

closing/reopening to rerun tests

@sdboyer sdboyer merged commit 24c37f5 into golang:master Jun 15, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants