-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Missing check for dir in the 'else' clause #1110
Conversation
Fixing issue when recursively scanning directories with filenames starting with '.' Without this fix, the `if not entry.name.startswith('.') and entry.is_file()` logic falls through to the `else` clause which in the current code base will error out as it encounters '.' files (e.g. .DS_Store)
Codecov Report
@@ Coverage Diff @@
## master #1110 +/- ##
=======================================
Coverage 67.96% 67.97%
=======================================
Files 159 159
Lines 10416 10413 -3
Branches 1896 1895 -1
=======================================
- Hits 7079 7078 -1
+ Misses 2969 2968 -1
+ Partials 368 367 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
lint failed. Any progress @achaiah ? We are considering merge 1110 before the next release. |
I updated the code per comments. Not sure if lint will still complain about line length. TBH that's a requirement that should be removed. We don't work in terminals with 80 chars length any more :) |
you can refer to https://github.com/open-mmlab/mmcv/blob/master/CONTRIBUTING.md to fix the lint |
hi @achaiah, thanks for your contribution. I push a commit to fix the indenterror and CI will be passed |
Hi @achaiah !First of all, we want to express our gratitude for your significant PR in this project. Your contribution is highly appreciated, and we are grateful for your efforts in helping improve this open-source project during your personal time. We believe that many developers will benefit from your PR. We would also like to invite you to join our Special Interest Group (SIG) private channel on Discord, where you can share your experiences, ideas, and build connections with like-minded peers. To join the SIG channel, simply message moderator— OpenMMLab on Discord or briefly share your open-source contributions in the #introductions channel and we will assist you. Look forward to seeing you there! Join us :https://discord.gg/UjgXkPWNqA If you have WeChat account,welcome to join our community on WeChat. You can add our assistant :openmmlabwx. Please add "mmsig + Github ID" as a remark when adding friends:) |
Motivation
Fixing issue when recursively scanning directories with filenames starting with '.' Without this fix, the
if not entry.name.startswith('.') and entry.is_file()
logic falls through to theelse
clause which in the current code base will error out as it encounters '.' files (e.g..DS_Store
)Modification
Add a check to make sure we only recurse on directories (and ignore '.' files)
BC-breaking (Optional)
No
Use cases (Optional)
N/A
Checklist