mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-05 06:25:46 +00:00
fixed issue with filenames when cache is turned on
This commit is contained in:
parent
763b163ee6
commit
413899809a
1 changed files with 15 additions and 6 deletions
|
|
@ -658,6 +658,21 @@ public class AppletLoader extends Applet implements Runnable, AppletStub {
|
|||
state = STATE_UPDATING_CLASSPATH;
|
||||
|
||||
percentage = 95;
|
||||
|
||||
// update filenames to match extracted files
|
||||
for (int i = 0; i < urlList.length; i++) {
|
||||
String filename = getFileName(urlList[i]);
|
||||
|
||||
if (filename.endsWith(".pack.lzma")) {
|
||||
urlList[i] = new URL("file://" + path + filename.replaceAll(".pack.lzma", ""));
|
||||
}
|
||||
else if (filename.endsWith(".pack")) {
|
||||
urlList[i] = new URL("file://" + path + filename.replaceAll(".pack", ""));
|
||||
}
|
||||
else if (filename.endsWith(".lzma")) {
|
||||
urlList[i] = new URL("file://" + path + filename.replaceAll(".lzma", ""));
|
||||
}
|
||||
}
|
||||
|
||||
Class[] parameters = new Class[] {URL.class};
|
||||
|
||||
|
|
@ -906,18 +921,12 @@ public class AppletLoader extends Applet implements Runnable, AppletStub {
|
|||
if (filename.endsWith(".pack.lzma")) {
|
||||
extractLZMA(path + filename, path + filename.replaceAll(".lzma", ""));
|
||||
extractPack(path + filename.replaceAll(".lzma", ""), path + filename.replaceAll(".pack.lzma", ""));
|
||||
// update list to contain .jar file
|
||||
urlList[i] = new URL("file://" + path + filename.replaceAll(".pack.lzma", ""));
|
||||
}
|
||||
else if (filename.endsWith(".pack")) {
|
||||
extractPack(path + filename, path + filename.replace(".pack", ""));
|
||||
// update list to contain .jar file
|
||||
urlList[i] = new URL("file://" + path + filename.replaceAll(".pack", ""));
|
||||
}
|
||||
else if (filename.endsWith(".lzma")) {
|
||||
extractLZMA(path + filename, path + filename.replace(".lzma", ""));
|
||||
// update list to contain .jar file
|
||||
urlList[i] = new URL("file://" + path + filename.replaceAll(".lzma", ""));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue