mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8206389: JarEntry.setCreation/LastAccessTime without setLastModifiedTime causes Invalid CEN header
Reviewed-by: alanb, martin
This commit is contained in:
parent
051f4ed627
commit
84234d1abb
2 changed files with 58 additions and 4 deletions
|
@ -582,7 +582,9 @@ class ZipOutputStream extends DeflaterOutputStream implements ZipConstants {
|
|||
uctime > UPPER_UNIXTIME_BOUND) {
|
||||
elen += 36; // NTFS time total 36 bytes
|
||||
} else {
|
||||
elen += 9; // headid(2) + sz(2) + flag(1) + mtime (4)
|
||||
elen += 5; // headid(2) + sz(2) + flag(1)
|
||||
if (e.mtime != null)
|
||||
elen += 4; // + mtime (4)
|
||||
}
|
||||
}
|
||||
writeShort(elen);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue