Browse files

Bugfix to AARLibrary

Some aar files do not have an explicit directory entry for every
object. Make sure we create the needed directories.

Change-Id: Ic79d8852b6cc48f2399794c4087507e8f9c3bbaf
  • Loading branch information...
jisqyv committed Sep 24, 2018
1 parent 560b372 commit eebd635fd6c331955ac86c4ea2e7f9f1080726ae
@@ -246,6 +246,12 @@ public void unpackToDirectory(final File path) throws IOException {
throw new IOException("Unable to create directory " + path.getAbsolutePath());
} else if (!entry.isDirectory()) {
try {
// Need to make sure the parent directory is present. Files can appear
// in a ZIP (AAR) file without an explicit directory object
File parentDir = target.getParentFile();
if (!parentDir.exists()) {
output = new FileOutputStream(target);
input = zip.getInputStream(entry);
IOUtils.copy(input, output);

0 comments on commit eebd635

Please sign in to comment.