LeaveStreamOpen doesn't work with TarWriter #211

Open
opened 2026-01-29 22:08:24 +00:00 by claunia · 0 comments
Owner

Originally created by @dudes-come on GitHub (Jul 8, 2017).

Originally assigned to: @adamhathcock on GitHub.

Example:

var tmpStream = new MemoryStream();
using (var writer = WriterFactory.Open(tmpStream, ArchiveType.Tar, new WriterOptions(CompressionType.None) { LeaveStreamOpen = true }))
{
}
// tmpStream disposed

Look this file:
https://github.com/adamhathcock/sharpcompress/blob/master/src/SharpCompress/Writers/AbstractWriter.cs
this.closeStream didn't set from the ctor (ArchiveType type, WriterOptions options).

Originally created by @dudes-come on GitHub (Jul 8, 2017). Originally assigned to: @adamhathcock on GitHub. Example: ``` csharp var tmpStream = new MemoryStream(); using (var writer = WriterFactory.Open(tmpStream, ArchiveType.Tar, new WriterOptions(CompressionType.None) { LeaveStreamOpen = true })) { } // tmpStream disposed ``` Look this file: https://github.com/adamhathcock/sharpcompress/blob/master/src/SharpCompress/Writers/AbstractWriter.cs this.closeStream didn't set from the ctor (ArchiveType type, WriterOptions options).
claunia added the bug label 2026-01-29 22:08:24 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#211