-
Notifications
You must be signed in to change notification settings - Fork 149
Flag empty files inside a package (fix #334) #359
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
Conversation
src/validator.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we determine from size metadata in both the XPI + file system cases? I also wonder if we also need a check to see if a file is just whitespace too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep yauzl iirc exposes unpacked size in the metadata object and the Directory class has just size which is from a stat object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
81ac350
to
574bdef
Compare
Using |
src/validator.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This API is different for the directory class [1].
Maybe we should add uncompressedSize as an alias? Either that or you need to check size too.
[1] https://github.com/mozilla/addons-validator/blob/master/src/io/utils.js#L21
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
574bdef
to
6a41cba
Compare
Pushed again; should be all set now. |
Lgtm. r+ |
Flag empty files inside a package (fix #334)
Internally flags all empty files inside addonMetadata without
throwing an error/raising any notices to the user, as requested
in #334.