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);