|
|
@@ -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); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|