ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Copy.java
Date Thu, 06 Feb 2003 16:21:11 GMT
bodewig     2003/02/06 08:21:10

  Modified:    src/main/org/apache/tools/ant/taskdefs Tag: ANT_15_BRANCH
                        Copy.java
  Log:
  Merge patch for bug 16768 from HEAD
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.42.2.5  +6 -2      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.42.2.4
  retrieving revision 1.42.2.5
  diff -u -r1.42.2.4 -r1.42.2.5
  --- Copy.java	4 Dec 2002 17:02:32 -0000	1.42.2.4
  +++ Copy.java	6 Feb 2003 16:21:10 -0000	1.42.2.5
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2000-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 2000-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -532,6 +532,10 @@
                   } catch (IOException ioe) {
                       String msg = "Failed to copy " + fromFile + " to " + toFile
                           + " due to " + ioe.getMessage();
  +                    File targetFile = new File(toFile);
  +                    if (targetFile.exists() && !targetFile.delete()) {
  +                        msg += " and I couldn't delete the corrupt " + toFile;
  +                    }
                       throw new BuildException(msg, ioe, getLocation());
                   }
               }
  
  
  

Mime
View raw message