You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by um...@apache.org on 2002/05/31 22:53:23 UTC

cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Move.java

umagesh     2002/05/31 13:53:23

  Modified:    .        Tag: ANT_15_BRANCH WHATSNEW
               src/main/org/apache/tools/ant/taskdefs Tag: ANT_15_BRANCH
                        Move.java
  Log:
  When <move> attempts a rename, it deletes the destination file, if it exists, before renaming the source file.  However, <move> was not checking if the destination file was actually a directory before trying to delete it.
  
  Submitted by: "Francis ANDRE" <fr...@e-xmlmedia.fr>
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.263.2.28 +5 -0      jakarta-ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/WHATSNEW,v
  retrieving revision 1.263.2.27
  retrieving revision 1.263.2.28
  diff -u -r1.263.2.27 -r1.263.2.28
  --- WHATSNEW	31 May 2002 20:41:47 -0000	1.263.2.27
  +++ WHATSNEW	31 May 2002 20:53:23 -0000	1.263.2.28
  @@ -16,6 +16,11 @@
   
   Fixed bugs:
   -----------
  +* When <move> attempts a rename, it deletes the destination file, if it
  +  exists, before renaming the source file.  However, <move> was not
  +  checking if the destination file was actually a directory before
  +  trying to delete it.
  +
   * Make CVS Tasks to work under Cygwin.
   
   * Fix LineContains to handle huge files elegantly without causing
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.25.2.1  +2 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Move.java
  
  Index: Move.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Move.java,v
  retrieving revision 1.25
  retrieving revision 1.25.2.1
  diff -u -r1.25 -r1.25.2.1
  --- Move.java	15 Apr 2002 15:33:09 -0000	1.25
  +++ Move.java	31 May 2002 20:53:23 -0000	1.25.2.1
  @@ -82,7 +82,7 @@
    * @author Glenn McAllister 
    *         <a href="mailto:glennm@ca.ibm.com">glennm@ca.ibm.com</a>
    * @author <a href="mailto:umagesh@rediffmail.com">Magesh Umasankar</a>
  - * @version $Revision: 1.25 $
  + * @version $Revision: 1.25.2.1 $
    *
    * @since Ant 1.2
    *
  @@ -306,7 +306,7 @@
                       }
                   }
   
  -                if (destFile.exists()) {
  +                if (destFile.exists() && destFile.isFile()) {
                       if (!destFile.delete()) {
                           throw new BuildException("Unable to remove existing "
                                                    + "file " + destFile);
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>