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:
JesusFreke@JesusFreke.com
2010-02-22 07:01:58 +00:00
parent 67c0929d67
commit 09ee2ce454

View File

@ -52,7 +52,27 @@ public class ClassPath {
File file = new File(classPathDir, bootClassPathEntry);
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()) {