Summary: small fix for the classpath loader

Add the file separator if the path does not end with one
This commit is contained in:
Hugo Trippaers 2013-01-07 22:16:05 +01:00
parent d5ac10d7b2
commit d616dcdd40

View File

@ -350,7 +350,12 @@ public class Script implements Callable<String> {
* Look in WEB-INF/classes of the webapp
* URI workaround the URL encoding of url.getFile
*/
url = Script.class.getClassLoader().getResource(path + script);
if (path.endsWith(File.separator)) {
url = Script.class.getClassLoader().getResource(path + script);
}
else {
url = Script.class.getClassLoader().getResource(path + File.separator + script);
}
s_logger.debug("Classpath resource: " + url);
if (url != null) {
try {