From 5dc8a1418a077cfce09baf030b1c744c816fc289 Mon Sep 17 00:00:00 2001 From: Peter Reilly Date: Wed, 26 Nov 2003 09:31:45 +0000 Subject: [PATCH] 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 --- src/main/org/apache/tools/ant/taskdefs/Zip.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/Zip.java b/src/main/org/apache/tools/ant/taskdefs/Zip.java index 0cb65be0d..56120ad20 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Zip.java +++ b/src/main/org/apache/tools/ant/taskdefs/Zip.java @@ -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"); } }