ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@locus.apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Copy.java
Date Fri, 13 Oct 2000 09:43:51 GMT
bodewig     00/10/13 02:43:49

  Modified:    src/main/org/apache/tools/ant/taskdefs Copy.java
  Log:
  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.
  
  Revision  Changes    Path
  1.5       +6 -0      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Copy.java
  
  Index: Copy.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Copy.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Copy.java	2000/10/06 11:24:56	1.4
  +++ Copy.java	2000/10/13 09:43:47	1.5
  @@ -191,6 +191,12 @@
   
           // do all the copy operations now...
           doFileOperations();
  +
  +        // clean up destDir again - so this instance can be used a second
  +        // time without throwing an exception
  +        if (destFile != null) {
  +            destDir = null;
  +        }
       }
   
   //************************************************************************
  
  
  

Mime
View raw message