From a44e2ea1d713c30f24635a6446c3d3025d48a1e2 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Thu, 19 Jul 2001 06:38:01 +0000 Subject: [PATCH] Make sure "ant -find" will return a "normal" filename (without /./) for the build file. Reported by: Costin Manolache Fix suggested by: Jesse Glick I still think we should fix Project.resolveFile to handle ../ and ./ sequences in rootDir as well. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269363 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/Main.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/org/apache/tools/ant/Main.java b/src/main/org/apache/tools/ant/Main.java index e8512a240..d8e186fae 100644 --- a/src/main/org/apache/tools/ant/Main.java +++ b/src/main/org/apache/tools/ant/Main.java @@ -297,7 +297,8 @@ public class Main { if (buildFile == null) { // but -find then search for it if (searchForThis != null) { - buildFile = findBuildFile(".", searchForThis); + buildFile = findBuildFile(System.getProperty("user.dir"), + searchForThis); } else { buildFile = new File(DEFAULT_BUILD_FILENAME); }