mirror of
https://github.com/revanced/smali.git
synced 2025-06-13 04:27:38 +02:00
When searching for the boot class path files, try alternate file endings as well
git-svn-id: https://smali.googlecode.com/svn/trunk@641 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
@ -52,7 +52,27 @@ public class ClassPath {
|
|||||||
File file = new File(classPathDir, bootClassPathEntry);
|
File file = new File(classPathDir, bootClassPathEntry);
|
||||||
|
|
||||||
if (!file.exists()) {
|
if (!file.exists()) {
|
||||||
continue;
|
boolean found = false;
|
||||||
|
int extIndex = bootClassPathEntry.lastIndexOf(".");
|
||||||
|
|
||||||
|
String baseEntry;
|
||||||
|
if (extIndex == -1) {
|
||||||
|
baseEntry = bootClassPathEntry;
|
||||||
|
} else {
|
||||||
|
baseEntry = bootClassPathEntry.substring(0, extIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (String ext: new String[]{".odex", ".jar", ".apk", ".zip"}) {
|
||||||
|
String newEntry = baseEntry + ext;
|
||||||
|
file = new File(classPathDir, newEntry);
|
||||||
|
if (file.exists()) {
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!found) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!file.canRead()) {
|
if (!file.canRead()) {
|
||||||
|
Reference in New Issue
Block a user