From a6be8c76c311f47001dfad8205fcdd8f2df774bf Mon Sep 17 00:00:00 2001 From: Hugo Trippaers Date: Thu, 30 Aug 2012 16:10:28 +0200 Subject: [PATCH] Reverting part of commit ff7c964a6621cf56d555120e9740dc87cf37b9eb (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. --- utils/src/com/cloud/utils/script/Script.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/utils/src/com/cloud/utils/script/Script.java b/utils/src/com/cloud/utils/script/Script.java index 0662e612607..feed76489d6 100755 --- a/utils/src/com/cloud/utils/script/Script.java +++ b/utils/src/com/cloud/utils/script/Script.java @@ -340,15 +340,18 @@ public class Script implements Callable { 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)); }