If "ant -find build.xml" is used and build.xml is in the current
dir, the returned file will be "/foo/bar/./build.xml", and that
might brake a number of <property location="..." /> and other
relative paths.
Index: src/main/org/apache/tools/ant/Main.java
===================================================================
RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Main.java,v
retrieving revision 1.37
diff -u -r1.37 Main.java
--- src/main/org/apache/tools/ant/Main.java 2001/07/17 12:12:39
1.37
+++ src/main/org/apache/tools/ant/Main.java 2001/07/17 21:26:48
@@ -360,6 +360,12 @@
File parent = new File(new File(start).getAbsolutePath());
File file = new File(parent, suffix);
+
+ if( file.exists() ) {
+ // it would be "/path/./build.xml, many things will brake
+ file=new File(suffix); // in cwd
+ return file;
+ }
// check if the target file exists in the current directory
while (!file.exists()) {