-
Notifications
You must be signed in to change notification settings - Fork 303
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
ZipOutputStream.putNextEntry no longer sets last modified file time on file entries #473
Comments
I fixed both the issues you mentioned (including the one where |
Thank you for the quick fix! I'm glad my report and sample test were useful. I'm not seeing any Thanks again! |
Thanks for pointing out. I fixed it. |
Fix included in v2.11.2 released today |
As of 2.11.0, file entries added via
putNextEntry
have a last modified date of 1980 whenZipParameters
are passed with the defaultlastModifiedFileTime == 0
value. 0f99010 removed some conditional logic fromFileHeaderFactory.generateFileHeader
:This logic was added to
putNextEntry
instead, but only for directory entries:As a result, the following test, which passes for 2.10.0, fails for 2.11.0 and 2.11.1:
Was this change intended as part of the fix to #434, or was this an unintended side effect?
The documentation for
ZipParameters.setLastModifiedTime
says:but the current time is not being used for file entries when
zipParams.getLastModifiedFileTime() <= 0
like it used to.(I noticed a separate potential bug where
ZipParameters.setLastModifiedTime
just returns whenlastModifiedFileTime <= 0
. It doesn't actually clear the current value as the documentation indicates.)The text was updated successfully, but these errors were encountered: