diff --git a/WHATSNEW b/WHATSNEW index 754dca9a7..385b2233f 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -4,6 +4,13 @@ Changes from Ant 1.9.6 TO Ant 1.9.7 Changes that could break older environments: ------------------------------------------- + * and used to ignore the dir attribute if it was the + same as the current working directory. They now no longer do, + which changes the behavior for vmlauncher="false" which would have + used the project's basedir rather than the current working + directory in that case. + Bugzilla Report 58555 + Fixed bugs: ----------- diff --git a/manual/Tasks/apply.html b/manual/Tasks/apply.html index 6cf948fa7..5444a644f 100644 --- a/manual/Tasks/apply.html +++ b/manual/Tasks/apply.html @@ -95,7 +95,12 @@ to send input to it is via the input and inputstring attributes.

dir the directory in which the command should be executed. - No + No.
+ Note: the default used when dir has not been + specified depends on the vmlauncher attribute. If + vmlauncher is true the task will use + the current working directory, otherwise it uses the project's basedir. + relative diff --git a/manual/Tasks/exec.html b/manual/Tasks/exec.html index 5cef148c8..8dfc6bc2a 100644 --- a/manual/Tasks/exec.html +++ b/manual/Tasks/exec.html @@ -171,7 +171,12 @@ or the task will fail as follows: dir the directory in which the command should be executed. - No + No.
+ Note: the default used when dir has not been + specified depends on the vmlauncher attribute. If + vmlauncher is true the task will use + the current working directory, otherwise it uses the project's basedir. + os diff --git a/src/main/org/apache/tools/ant/taskdefs/Execute.java b/src/main/org/apache/tools/ant/taskdefs/Execute.java index 9523f4538..128caa9eb 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Execute.java +++ b/src/main/org/apache/tools/ant/taskdefs/Execute.java @@ -362,9 +362,7 @@ public class Execute { * @param wd the working directory of the process. */ public void setWorkingDirectory(File wd) { - workingDirectory = - (wd == null || wd.getAbsolutePath().equals(antWorkingDirectory)) - ? null : wd; + workingDirectory = wd; } /**