mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-08 05:27:04 +00:00
[PR #409] [MERGED] Recognise empty tar archives. #1012
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/adamhathcock/sharpcompress/pull/409
Author: @Quogu
Created: 8/17/2018
Status: ✅ Merged
Merged: 9/25/2018
Merged by: @adamhathcock
Base:
master← Head:RecogniseEmptyTarArchives📝 Commits (1)
83f6690Recognise empty tar archives.📊 Changes
3 files changed (+15 additions, -3 deletions)
View changed files
📝
src/SharpCompress/Archives/Tar/TarArchive.cs(+4 -3)📝
tests/SharpCompress.Test/Tar/TarArchiveTests.cs(+11 -0)➕
tests/TestArchives/Archives/Tar.Empty.tar(+0 -0)📄 Description
Currently, when ArchiveFactory.Open is called on an empty tar archive, it throws due to being unable to determine the stream type. This fix allows it to recognise empty tar files by checking for whether the filename is empty, the size is empty and the entry type is defined. Add a test to try opening an empty archive.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.