-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Finder] ExcludeDirectoryFilterIterator does not like trailing slashes #19599
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
Comments
Can you show what |
|
Here's the test 2.7...ro0NL:finder/rtrim-excluded-dirs I can PR this if you want.. but maybe you have something going on already. The class is complex though.. i cant really visualize it how it works in recursive state (ie |
@ro0NL you can PR it, I'm not that far with my test. |
…FilterIterator (ro0NL) This PR was merged into the 2.7 branch. Discussion ---------- [Finder] Trim trailing directory slash in ExcludeDirectoryFilterIterator | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #19599 | License | MIT | Doc PR | reference to the documentation PR, if any In this context `path` equals `path/` Commits ------- e0e5f0c apply rtrim
Hi!
With PHPCPD (sebastianbergmann/phpcpd#135) I found out that
ExcludeDirectoryFilterIterator
does not exclude a directory if it is informed with a trailing slash (very common to happen if you're using bash autocomplete).Looks like just
rtrim($directory, '/')
here will do the trick, but I was not able to assemble a unit test yet.Any other approach to fix this?
Thanks!
The text was updated successfully, but these errors were encountered: