holtdl 02/03/31 21:41:30
Modified: src/main/org/apache/tools/ant/taskdefs Ant.java
Log:
If 'output' is a simple or relative filename, make it relative
to ${basedir}, not ${user.dir}. (If it's a full-path, it'll go
to the full-path file.) (PR 4548)
Revision Changes Path
1.44 +7 -2
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Ant.java
Index: Ant.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Ant.java,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- Ant.java 3 Mar 2002 01:46:20 -0000 1.43
+++ Ant.java 1 Apr 2002 05:41:30 -0000 1.44
@@ -104,7 +104,8 @@
private String target = null;
/** the output */
- private String output = null;
+ private String output = null;
+ private String outfile = null;
/** should we inherit properties from the parent ? */
private boolean inheritAll = true;
@@ -174,8 +175,12 @@
}
if (output != null) {
+ if (dir != null) {
+ File file = FileUtils.newFileUtils().resolveFile(dir,
output);
+ outfile = file.getAbsolutePath();
+ }
try {
- PrintStream out = new PrintStream(new
FileOutputStream(output));
+ PrintStream out = new PrintStream(new
FileOutputStream(outfile));
DefaultLogger logger = new DefaultLogger();
logger.setMessageOutputLevel(Project.MSG_INFO);
logger.setOutputPrintStream(out);
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>