Use 0777 instead of FileInfo() for dirs.

Golang's FileInfo() implementation recognizes FAT filesystem directories
correctly, but doesn't actually add executable bits, which essentially
makes them inaccessible. Use 0777 when we know we're dealing with
directories.

(This is a cherry-pick change.)

Fixes: 153207404
Test: manually tested with an aar file with FAT permission bits.
Change-Id: Ie9f5320bc44d24b2f9d54d4036bb1747456655bb
Merged-In: Ie9f5320bc44d24b2f9d54d4036bb1747456655bb
This commit is contained in:
Jaewoong Jung 2020-04-03 18:35:38 -07:00
parent ab768cf54b
commit a86983dc7a

View file

@ -115,7 +115,7 @@ func main() {
filename := filepath.Join(*outputDir, name)
if f.FileInfo().IsDir() {
must(os.MkdirAll(filename, f.FileInfo().Mode()))
must(os.MkdirAll(filename, 0777))
} else {
must(os.MkdirAll(filepath.Dir(filename), 0777))
in, err := f.Open()