Merge pull request #99 from tschulte/issue-94

make ucode with pack.gz work again
This commit is contained in:
Michael Bayne
2018-05-11 18:30:13 -07:00
committed by GitHub
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();