diff --git a/pom.xml b/pom.xml index e5ff6d72..8217c3df 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.rarchives.ripme ripme jar - 1.0.21 + 1.0.22 ripme http://rip.rarchives.com diff --git a/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java b/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java index caefb2bc..3e790cee 100644 --- a/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java +++ b/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java @@ -19,7 +19,7 @@ import org.jsoup.nodes.Document; public class UpdateUtils { private static final Logger logger = Logger.getLogger(UpdateUtils.class); - private static final String DEFAULT_VERSION = "1.0.21"; + private static final String DEFAULT_VERSION = "1.0.22"; private static final String updateJsonURL = "http://rarchives.com/ripme.json"; private static final String updateJarURL = "http://rarchives.com/ripme.jar"; private static final String mainFileName = "ripme.jar"; diff --git a/src/main/java/com/rarchives/ripme/utils/Utils.java b/src/main/java/com/rarchives/ripme/utils/Utils.java index 2500984a..3c514846 100644 --- a/src/main/java/com/rarchives/ripme/utils/Utils.java +++ b/src/main/java/com/rarchives/ripme/utils/Utils.java @@ -199,23 +199,25 @@ public class Utils { } } else { + // Load from JAR try { - logger.debug("fullPath = " + fullPath); String jarPath = fullPath .replaceFirst("[.]jar[!].*", ".jar") .replaceFirst("file:", "") .replaceAll("%20", " "); - logger.debug("jarPath = " + jarPath); JarFile jarFile = new JarFile(jarPath); Enumeration entries = jarFile.entries(); while(entries.hasMoreElements()) { - String entryName = entries.nextElement().getName(); + JarEntry nextElement = entries.nextElement(); + String entryName = nextElement.getName(); if(entryName.startsWith(relPath) - && entryName.length() > (relPath.length() + "/".length())) { + && entryName.length() > (relPath.length() + "/".length()) + && !nextElement.isDirectory()) { String className = entryName.replace('/', '.').replace('\\', '.').replace(".class", ""); try { classes.add(Class.forName(className)); } catch (ClassNotFoundException e) { + logger.error("ClassNotFoundException loading " + className); throw new RuntimeException("ClassNotFoundException loading " + className); } }