From 7c944a3a408a70861fea698873f0ee0100a490ec Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Wed, 27 Feb 2002 09:26:31 +0000 Subject: [PATCH] Temporary zip files used for update weren't being deleted, as doUpdate is reset during cleanUp. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271574 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/taskdefs/Zip.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/Zip.java b/src/main/org/apache/tools/ant/taskdefs/Zip.java index 92e83ec22..a573e1a3b 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Zip.java +++ b/src/main/org/apache/tools/ant/taskdefs/Zip.java @@ -331,6 +331,14 @@ public class Zip extends MatchingTask { addFiles(tmp, zOut); } finalizeZipOutputStream(zOut); + + // If we've been successful on an update, delete the temporary file + if (doUpdate) { + if (!renamedFile.delete()) { + log ("Warning: unable to delete temporary file " + + renamedFile.getName(), Project.MSG_WARN); + } + } success = true; } finally { // Close the output stream. @@ -369,14 +377,6 @@ public class Zip extends MatchingTask { } finally { cleanUp(); } - - // If we've been successful on an update, delete the temporary file - if (success && doUpdate) { - if (!renamedFile.delete()) { - log ("Warning: unable to delete temporary file " + - renamedFile.getName(), Project.MSG_WARN); - } - } } /**