Reverting part of commit ff7c964a66 (Add

ability to do jetty:run in eclipse). This change breaks the ability to
upload scripts to XenServer (and possibly other places). Needs some
investigation before enabling this again.
This commit is contained in:
Hugo Trippaers 2012-08-30 16:10:28 +02:00
parent 2ba09d88c8
commit a6be8c76c3
1 changed files with 9 additions and 6 deletions

View File

@ -340,15 +340,18 @@ public class Script implements Callable<String> {
File file = null;
if (url != null) {
file = new File(url.getFile());
s_logger.debug("Absolute path = " + file.getAbsolutePath());
return file.getAbsolutePath();
}
url = Script.class.getClassLoader().getResource(path);
if (url != null) {
file = new File(url.getFile());
return file.getAbsolutePath();
}
/* url = Script.class.getClassLoader().getResource(path);
* s_logger.debug("Classpath resource: " + url);
* if (url != null) {
* file = new File(url.getFile());
* s_logger.debug("Absolute path = " + file.getAbsolutePath());
* return file.getAbsolutePath();
* }
*/
if (path.endsWith(File.separator)) {
path = path.substring(0, path.lastIndexOf(File.separator));
}