< prev index next >
src/java.base/share/classes/java/util/zip/ZipOutputStream.java
Print this page
*** 509,519 ****
/**
* Adds information about compatibility of file attribute information
* to a version value.
*/
private int versionMadeBy(ZipEntry e, int version) {
! return (e.posixPerms < 0) ? version :
VERSION_MADE_BY_BASE_UNIX | (version & 0xff);
}
/*
* Write central directory (CEN) header for specified entry.
--- 509,519 ----
/**
* Adds information about compatibility of file attribute information
* to a version value.
*/
private int versionMadeBy(ZipEntry e, int version) {
! return (e.extraAttributes < 0) ? version :
VERSION_MADE_BY_BASE_UNIX | (version & 0xff);
}
/*
* Write central directory (CEN) header for specified entry.
*** 604,615 ****
commentBytes = null;
writeShort(0);
}
writeShort(0); // starting disk number
writeShort(0); // internal file attributes (unused)
! // external file attributes, used for storing posix permissions
! writeInt(e.posixPerms > 0 ? e.posixPerms << 16 : 0);
writeInt(offset); // relative offset of local header
writeBytes(nameBytes, 0, nameBytes.length);
// take care of EXTID_ZIP64 and EXTID_EXTT
if (hasZip64) {
--- 604,615 ----
commentBytes = null;
writeShort(0);
}
writeShort(0); // starting disk number
writeShort(0); // internal file attributes (unused)
! // extra file attributes, used for storing posix permissions etc.
! writeInt(e.extraAttributes > 0 ? e.extraAttributes << 16 : 0);
writeInt(offset); // relative offset of local header
writeBytes(nameBytes, 0, nameBytes.length);
// take care of EXTID_ZIP64 and EXTID_EXTT
if (hasZip64) {
< prev index next >