Skip to content
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

mz_compat: support unzGetCurrentFileInfo without pfile_info #536

Merged
merged 2 commits into from Dec 3, 2020

Conversation

NikoDelarich
Copy link
Contributor

Allow getting filename/extrafield/comment separately without specifying an unz_file_info structure to improve compatibility with minizip1.
Fixes issue #535.

Allow getting filename/extrafield/comment separately without specifying an unz_file_info structure to improve compatibility with minizip1.
mz_compat.c Outdated
@@ -606,8 +606,9 @@ int unzGetCurrentFileInfo(unzFile file, unz_file_info *pfile_info, char *filenam
return UNZ_PARAMERROR;

err = mz_zip_entry_get_info(compat->handle, &file_info);
if (err != MZ_OK) return err;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return on separate line.

@nmoinvaz
Copy link
Member

nmoinvaz commented Dec 3, 2020

Thanks for the pull request. Can you also make similar changes to unzGetCurrentFileInfo64?

…well

Moved return statement to separate line.
Applied the same changes to unzGetCurrentFileInfo64 (allow getting filename/comment/extrafield separately without unz_file_info64)
@nmoinvaz nmoinvaz changed the base branch from master to dev December 3, 2020 08:13
@nmoinvaz nmoinvaz merged commit ee60b3c into zlib-ng:dev Dec 3, 2020
@nmoinvaz
Copy link
Member

nmoinvaz commented Dec 3, 2020

Looks good! Thank you!

@nmoinvaz nmoinvaz added 2.0 compatibility Backwards compatibility labels Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Backwards compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants