Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Creating a tar directly into a GZipStream crashes when writing final records #70172

Copy link
Copy link

Description

@carlossanlop
Issue body actions

The root cause is that we access the position, which is unsupported by GZipStream (unseekable stream).

https://github.com/dotnet/runtime/blame/218a4b1dad3f73eec8f9898761501c4cfa14698e/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarWriter.cs#L314

The fix would be to detect if the stream is seekable. If it is, then we can set the length to the position. Otherwise, we skip that step.

Thanks @rainersigwald for reporting this.

Reactions are currently unavailable

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

Morty Proxy This is a proxified and sanitized view of the page, visit original site.