[Swift-commit] cog r3644

swift at ci.uchicago.edu swift at ci.uchicago.edu
Mon Mar 18 04:00:05 CDT 2013


------------------------------------------------------------------------
r3644 | hategan | 2013-03-18 03:59:54 -0500 (Mon, 18 Mar 2013) | 1 line

fixed relative resolution of included file names (it should be with respect with the location of the file from which the include happens)
------------------------------------------------------------------------
Index: modules/karajan/src/org/globus/cog/karajan/workflow/nodes/Include.java
===================================================================
--- modules/karajan/src/org/globus/cog/karajan/workflow/nodes/Include.java	(revision 3643)
+++ modules/karajan/src/org/globus/cog/karajan/workflow/nodes/Include.java	(working copy)
@@ -150,13 +150,14 @@
 			throw new ExecutionException("No include file specified");
 		}
 		else {
+			String dir = null;
 			File f = new File(iname);
 			if (!f.isAbsolute()) {
 				boolean found = false;
 				List includeDirs = stack.getExecutionContext().getProperties().getDefaultIncludeDirs();
 				Iterator i = includeDirs.iterator();
 				while (i.hasNext()) {
-					String dir = (String) i.next();
+					dir = (String) i.next();
 					if (dir.equals(".")) {
 						/*
 						 * "." means current directory relative to the current
@@ -222,7 +223,6 @@
 									logger.debug(iname + " included from " + dir);
 								}
 								reader = new FileReader(iname);
-								setProperty("_path", dir);
 								found = true;
 								break;
 							}
@@ -263,6 +263,7 @@
 						XMLConverter.read(this, tree,
 								new KarajanTranslator(reader, iname).translate(), iname, false);
 					}
+					tree.getRoot().setProperty("_path", dir);
 					reader.close();
 				}
 				catch (Exception e) {



More information about the Swift-commit mailing list