I keep forgetting about the ability to run tasks more than once in the same
invocation of a project.  :-[ Thanks for fixing that.

Glenn McAllister
Software Developer. IBM Toronto Lab, (416) 448-3805
"An approximate answer to the right question is better than the
right answer to the wrong question." - John W. Tukey


Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:
Subject:  cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs
      Copy.java

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;
  +        }
       }


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






Reply via email to