ZIP files: only list directories, that contain .class files

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@626 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent b6c446e241
commit da32b3bdee
  1. 6
      jode/jode/bytecode/SearchPath.java

@ -69,8 +69,7 @@ public class SearchPath {
String name = ze.getName(); String name = ze.getName();
if (name.endsWith("/")) if (name.endsWith("/"))
name = name.substring(0, name.length()-1); name = name.substring(0, name.length()-1);
if (ze.isDirectory() && !zipEntries[nr].containsKey(name)) if (!ze.isDirectory() && name.endsWith(".class"))
zipEntries[nr].put(name, new Vector());
addEntry(zipEntries[nr], name); addEntry(zipEntries[nr], name);
} }
} }
@ -130,8 +129,7 @@ public class SearchPath {
String name = ze.getName(); String name = ze.getName();
if (name.endsWith("/")) if (name.endsWith("/"))
name = name.substring(0, name.length()-1); name = name.substring(0, name.length()-1);
if (ze.isDirectory() && !zipEntries[nr].containsKey(name)) if (!ze.isDirectory() && name.endsWith(".class"))
zipEntries[nr].put(name, new Vector());
addEntry(zipEntries[nr], name); addEntry(zipEntries[nr], name);
zis.closeEntry(); zis.closeEntry();
} }

Loading…
Cancel
Save