From 8f7ea420b332c426cc6cedeea7f9a28fa5707746 Mon Sep 17 00:00:00 2001 From: Dmitry Nesterov <4ybaka@gmail.com> Date: Sat, 13 Jan 2018 00:41:35 +0100 Subject: [PATCH] Revert "Added ability to leave tar archive open after stream is closed" This reverts commit 9092ecf33128925f6e66f3a7b91641de435a45cb. --- src/SharpCompress/Writers/Tar/TarWriter.cs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/SharpCompress/Writers/Tar/TarWriter.cs b/src/SharpCompress/Writers/Tar/TarWriter.cs index c4036b1b..db7bc97a 100644 --- a/src/SharpCompress/Writers/Tar/TarWriter.cs +++ b/src/SharpCompress/Writers/Tar/TarWriter.cs @@ -11,13 +11,9 @@ namespace SharpCompress.Writers.Tar { public class TarWriter : AbstractWriter { - private readonly bool finalizeArchiveOnClose; - - public TarWriter(Stream destination, WriterOptions options, bool finalizeArchiveOnClose = true) + public TarWriter(Stream destination, WriterOptions options) : base(ArchiveType.Tar, options) { - this.finalizeArchiveOnClose = finalizeArchiveOnClose; - if (!destination.CanWrite) { throw new ArgumentException("Tars require writable streams."); @@ -101,10 +97,8 @@ namespace SharpCompress.Writers.Tar { if (isDisposing) { - if (finalizeArchiveOnClose){ - PadTo512(0, true); - PadTo512(0, true); - } + PadTo512(0, true); + PadTo512(0, true); switch (OutputStream) { case BZip2Stream b: