Browse Source

Reset destDir to null in <copy> if destFile has been set. This allows

a single instance of Copy to be used more than one - like in

ant -Dant.install=../dist/jakarta-ant dist install

where the second time the dist target gets executed would throw an
exception. You can see this in the logs of recent nightly builds of Ant.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268084 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 24 years ago
parent
commit
1172691331
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      src/main/org/apache/tools/ant/taskdefs/Copy.java

+ 6
- 0
src/main/org/apache/tools/ant/taskdefs/Copy.java View File

@@ -191,6 +191,12 @@ public class Copy extends Task {


// do all the copy operations now... // do all the copy operations now...
doFileOperations(); doFileOperations();

// clean up destDir again - so this instance can be used a second
// time without throwing an exception
if (destFile != null) {
destDir = null;
}
} }


//************************************************************************ //************************************************************************


Loading…
Cancel
Save