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
[COMPRESS-429] Provide information about source of name / comment field values (e.g. Unicode) #56
Conversation
1 similar comment
Many thanks @dalbani this looks good. I've got two wishes, though:
Of course, adding tests woudln't hurt , either;-) |
@dalbani I've extended your PR with https://github.com/apache/commons-compress/tree/COMPRESS-429 - could you please have a look? |
@@ -239,6 +239,7 @@ static void setNameAndCommentFromExtraFields(final ZipArchiveEntry ze, | |||
originalNameBytes); | |||
if (newName != null && !originalName.equals(newName)) { |
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.
When I think about it, I would remove the second test in this if
, so that the Unicode field always have "priority" over the original name as source.
Scenario where it would matter is when the originalName
contains a non ASCII value (which is properly decoded) and which matches with the Unicode field value.
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.
I think the second part is there for a reason, even though my memory is failing me right now - and I stumbled over it myself when I realized the same check is not present for the comment.
I understand what you mean, though, changed with c290609
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.
After some digging through the history it seems the reason no longer exists, I've removed the second part with ced2075.
@bodewig: my apologies for not getting back to you sooner, I was on vacation. |
Don't worry about any delay @dalbani many thanks. I've merged the branch to master by now, will be included in Compress 1.16. |
@bodewig: thanks for your great overall reactivity for this feature request! I look forward for release 1.16. |
https://issues.apache.org/jira/browse/COMPRESS-429