Browse Source

add filename to errormessage if unable to rename file in zip task

PR: 24945
Obtained from: Bart Vanhaute


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275695 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 21 years ago
parent
commit
5dc8a1418a
1 changed files with 8 additions and 4 deletions
  1. +8
    -4
      src/main/org/apache/tools/ant/taskdefs/Zip.java

+ 8
- 4
src/main/org/apache/tools/ant/taskdefs/Zip.java View File

@@ -421,11 +421,15 @@ public class Zip extends MatchingTask {
try {
fileUtils.rename(zipFile, renamedFile);
} catch (SecurityException e) {
throw new BuildException("Not allowed to rename old file "
+ "to temporary file");
throw new BuildException(
"Not allowed to rename old file ("
+ zipFile.getAbsolutePath()
+ ") to temporary file");
} catch (IOException e) {
throw new BuildException("Unable to rename old file "
+ "to temporary file");
throw new BuildException(
"Unable to rename old file ("
+ zipFile.getAbsolutePath()
+ ") to temporary file");
}
}



Loading…
Cancel
Save