Merge "Always call SetMode in soong_zip" am: 52c7ae1a5a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1704607 Change-Id: I6b25f36598c5f1e4d62ac18e286dab6333047418
This commit is contained in:
@@ -656,9 +656,11 @@ func (z *ZipWriter) addFile(dest, src string, method uint16, emulateJar, srcJar
|
|||||||
UncompressedSize64: uint64(fileSize),
|
UncompressedSize64: uint64(fileSize),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mode := os.FileMode(0600)
|
||||||
if executable {
|
if executable {
|
||||||
header.SetMode(0700)
|
mode = 0700
|
||||||
}
|
}
|
||||||
|
header.SetMode(mode)
|
||||||
|
|
||||||
err = createParentDirs(dest, src)
|
err = createParentDirs(dest, src)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@@ -62,7 +62,7 @@ func fh(name string, contents []byte, method uint16) zip.FileHeader {
|
|||||||
Method: method,
|
Method: method,
|
||||||
CRC32: crc32.ChecksumIEEE(contents),
|
CRC32: crc32.ChecksumIEEE(contents),
|
||||||
UncompressedSize64: uint64(len(contents)),
|
UncompressedSize64: uint64(len(contents)),
|
||||||
ExternalAttrs: 0,
|
ExternalAttrs: (syscall.S_IFREG | 0600) << 16,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user