From 3d350f4b83164128fe67fb4d3ec965f94a49fb2d Mon Sep 17 00:00:00 2001 From: Peter Reilly Date: Tue, 11 Jan 2005 18:30:34 +0000 Subject: [PATCH] Write two EOF blocks for tar rather than one PR: 28776 Obtained from: Oliver Rossmueller git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277339 13f79535-47bb-0310-9956-ffa450edef68 --- CONTRIBUTORS | 1 + WHATSNEW | 3 +++ src/main/org/apache/tools/tar/TarOutputStream.java | 5 ++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 4223ed26f..8aa696813 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -155,6 +155,7 @@ Nick Pellow Nicola Ken Barozzi Nico Seessle Nigel Magnay +Oliver Rossmueller Patrick C. Beard Patrick Chanezon Patrick G. Heck (Gus Heck) diff --git a/WHATSNEW b/WHATSNEW index 444b1cced..66f258773 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -123,6 +123,9 @@ Changes that could break older environments: * The subant task used the canonical version of a file path. This has been changed to use the absolute path. Bugzilla 30438. +* Tar now writes two EOF blocks rather than one. + Bugzilla report 28776 + Other changes: -------------- diff --git a/src/main/org/apache/tools/tar/TarOutputStream.java b/src/main/org/apache/tools/tar/TarOutputStream.java index a5aad3447..639eecd62 100644 --- a/src/main/org/apache/tools/tar/TarOutputStream.java +++ b/src/main/org/apache/tools/tar/TarOutputStream.java @@ -96,9 +96,12 @@ public class TarOutputStream extends FilterOutputStream { /** * Ends the TAR archive without closing the underlying OutputStream. - * The result is that the EOF record of nulls is written. + * The result is that the two EOF records of nulls are written. */ public void finish() throws IOException { + // See Bugzilla 28776 for a discussion on this + // http://issues.apache.org/bugzilla/show_bug.cgi?id=28776 + this.writeEOFRecord(); this.writeEOFRecord(); }