-
Notifications
You must be signed in to change notification settings - Fork 52
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
HiddenFileFilter behaviour doesn't match its description #22
Comments
Note the javadoc for
Which leaves me even more perplexed as to what should or shouldn't be changed implementation-wise. Definitely whatever happens here the docs should be updated to reflect the implementation. |
In light of what Dale posted, the current implementation should exclude the files starting with a dot if you're on Mac and Linux.
Assuming that |
@eed3si9n That sounds fine to me. I don't think the fix is urgent - I couldn't find any evidence that anyone has ever noticed it before, and it's probably existed since forever, so 1.x is fine. |
See
io/io/src/main/scala/sbt/io/NameFilter.scala
Line 46 in 16f0f6a
The comment there is:
That sounds like reasonable behaviour for the filter, but the implementation doesn't match that at all, it selects files that are hidden AND whose names aren't EQUAL to
.
. It needs to be changed to OR andstartsWith
dot to match.Obviously the implementation has a bug, but the fix I think is less obvious - not excluding files that start with a dot probably hasn't caused anyone any issues, otherwise this issue would be reported and fixed. The question is, how many builds will break if the behaviour is changed to exclude files that start with a dot? I wouldn't be surprised if some builds do break.
So the question is, should the behaviour be updated to match the description, or should the description be modified to match the behaviour (and the check for the file name being equal to
.
be removed altogether)?The text was updated successfully, but these errors were encountered: