Fix crashing when zip not signed

This commit is contained in:
topjohnwu 2016-12-08 23:03:50 +08:00
parent cb1df5217e
commit c9217a419a
2 changed files with 4 additions and 2 deletions

View File

@ -136,7 +136,9 @@ public class ZipUtils {
Enumeration e = zipfile.entries();
while(e.hasMoreElements()) {
entry = (JarEntry) e.nextElement();
if (!entry.getName().contains(path)) {
if (!entry.getName().contains(path)
|| entry.getName().charAt(entry.getName().length() - 1) == '/') {
// Ignore directories, only create files
continue;
}
Logger.dev("ZipUtils: Extracting: " + entry);

View File

@ -6,7 +6,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'com.android.tools.build:gradle:2.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files