mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
Summary: small fix for the classpath loader
Add the file separator if the path does not end with one
This commit is contained in:
parent
d5ac10d7b2
commit
d616dcdd40
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user