make ucode with pack.gz work again

Closes #94
This commit is contained in:
Tobias Schulte
2018-04-30 14:28:37 +02:00
parent 5cc23397cd
commit 8d57dfe1e4
2 changed files with 3 additions and 2 deletions
@@ -334,7 +334,8 @@ public class Resource implements Comparable<Resource>
protected static boolean isPacked200Jar (String path)
{
return path.endsWith(".jar.pack") || path.endsWith(".jar.pack.gz");
return path.endsWith(".jar.pack") || path.endsWith(".jar.pack_new") ||
path.endsWith(".jar.pack.gz")|| path.endsWith(".jar.pack.gz_new");
}
protected String _path;
@@ -177,7 +177,7 @@ public class FileUtil
extractedJarFileOut = new FileOutputStream(target);
jarOutputStream = new JarOutputStream(extractedJarFileOut);
packedJarIn = new FileInputStream(packedJar);
if (packedJar.getName().endsWith(".gz")) {
if (packedJar.getName().endsWith(".gz") || packedJar.getName().endsWith(".gz_new")) {
packedJarIn = new GZIPInputStream(packedJarIn);
}
Pack200.Unpacker unpacker = Pack200.newUnpacker();