Skip to content

Commit b904924

Browse files
committed
ignore .class files in META-INF subfolder (fixes #5778)
1 parent 5ab60c8 commit b904924

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

app/src/processing/app/Util.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -559,15 +559,14 @@ static private void packageListFromZip(String filename, StringList list) {
559559
if (!entry.isDirectory()) {
560560
String name = entry.getName();
561561

562-
if (name.endsWith(".class")) {
562+
// Avoid META-INF because some jokers but .class files in there
563+
// https://github.com/processing/processing/issues/5778
564+
if (name.endsWith(".class") && !name.startsWith("META-INF/")) {
563565
int slash = name.lastIndexOf('/');
564-
if (slash == -1) continue;
565-
566-
String pname = name.substring(0, slash);
567-
// if (map.get(pname) == null) {
568-
// map.put(pname, new Object());
569-
// }
570-
list.appendUnique(pname);
566+
if (slash != -1) {
567+
String packageName = name.substring(0, slash);
568+
list.appendUnique(packageName);
569+
}
571570
}
572571
}
573572
}

todo.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ X fix an editor problem with plain text (css, etc) files
77
X https://github.com/processing/processing/issues/5628
88
X default to using Desktop methods for URLs and files when available on Linux
99
X also cover a few weird cases that were failing silently
10-
10+
X The package "META" does not exist when .class files found in META-INF folder
11+
X https://github.com/processing/processing/issues/5778
1112

1213
contrib
1314
X update translation of "sketch" for Russian speakers

0 commit comments

Comments
 (0)