Browse Source

support failonerror when file locked or similar issue. Bugzilla report 38175.

Submitted by Georges-Etienne Legendre.



git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@367316 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 19 years ago
parent
commit
c141e2c273
3 changed files with 8 additions and 1 deletions
  1. +1
    -0
      CONTRIBUTORS
  2. +3
    -0
      WHATSNEW
  3. +4
    -1
      src/main/org/apache/tools/ant/taskdefs/Copy.java

+ 1
- 0
CONTRIBUTORS View File

@@ -72,6 +72,7 @@ Frank Harnack
Frederic Lavigne
Gary S. Weaver
Gautam Guliani
Georges-Etienne Legendre
Gero Vermaas
Gerrit Riessen
Glenn McAllister


+ 3
- 0
WHATSNEW View File

@@ -175,6 +175,9 @@ Fixed bugs:
* Project not set on ChainReaderHelpers used by the Redirector.
Bugzilla report 37958.

* Copy task would fail on locked (or otherwise uncopyable) files even if
failonerror set to false. Bugzilla report 38175.

Other changes:
--------------
* Minor performance improvements Bugzilla report 37777


+ 4
- 1
src/main/org/apache/tools/ant/taskdefs/Copy.java View File

@@ -799,7 +799,10 @@ public class Copy extends Task {
if (targetFile.exists() && !targetFile.delete()) {
msg += " and I couldn't delete the corrupt " + toFile;
}
throw new BuildException(msg, ioe, getLocation());
if (failonerror) {
throw new BuildException(msg, ioe, getLocation());
}
log(msg, Project.MSG_ERR);
}
}
}


Loading…
Cancel
Save