jskeet 02/02/27 01:26:31
Modified: src/main/org/apache/tools/ant/taskdefs Zip.java
Log:
Temporary zip files used for update weren't being deleted, as doUpdate is
reset during cleanUp.
Revision Changes Path
1.66 +8 -8
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Zip.java
Index: Zip.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Zip.java,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- Zip.java 19 Feb 2002 15:12:05 -0000 1.65
+++ Zip.java 27 Feb 2002 09:26:31 -0000 1.66
@@ -331,6 +331,14 @@
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.
@@ -368,14 +376,6 @@
throw new BuildException(msg, t, location);
} 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);
- }
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>