From 648c0f4d15d9ab6bac9deef010a1b66824cd8da1 Mon Sep 17 00:00:00 2001 From: acolyer Date: Thu, 5 Aug 2004 17:31:56 +0000 Subject: fix for Bugzilla Bug 42573 .lst file entries not resolved relative to list file: {boot}classpath, extdirs, --- util/src/org/aspectj/util/ConfigParser.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'util') diff --git a/util/src/org/aspectj/util/ConfigParser.java b/util/src/org/aspectj/util/ConfigParser.java index 59ce90b94..4f4e0e2ba 100644 --- a/util/src/org/aspectj/util/ConfigParser.java +++ b/util/src/org/aspectj/util/ConfigParser.java @@ -20,6 +20,7 @@ import java.io.*; public class ConfigParser { Location location; + protected File relativeDirectory = null; protected List files = new LinkedList(); private boolean fileParsed = false; protected static String CONFIG_MSG = "build config error: "; @@ -69,7 +70,10 @@ public class ConfigParser { location = new SourceLocation(configFile, lineNum); showError("error reading config file: " + e.toString()); } + File oldRelativeDirectory = relativeDirectory; // for nested arg files; + relativeDirectory = configFile.getParentFile(); parseArgs(args); + relativeDirectory = oldRelativeDirectory; fileParsed = true; } @@ -203,7 +207,11 @@ public class ConfigParser { } public File makeFile(String name) { - return makeFile(getCurrentDir(), name); + if (relativeDirectory != null) { + return makeFile(relativeDirectory,name); + } else { + return makeFile(getCurrentDir(), name); + } } private File makeFile(File dir, String name) { -- cgit v1.2.3