mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
RAR archive mistaken as Tar archive #64
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?
Originally created by @elgonzo on GitHub (Sep 7, 2015).
SharpCompress will not open and read the following RAR file correctly:
RAR file download link:http://wikisend.com/download/295490/RAR_identified_as_Tar.rar
Password: adamhathcock
(The download link expires after 90 days!)
The RAR archive is NOT in RAR5 format, and it contains only one file "PROTONIX.D64".
ArchiveFactory.Open(...) will return a SharpCompress.Archive.Tar.TarArchive instance for this RAR file.
And ReaderFactory.Open(...) will return a SharpCompress.Reader.Tar.TarReader.
SharpCompress version used: 0.11.1
@elgonzo commented on GitHub (Sep 7, 2015):
I guess the file format check should be changed so that Tar is tested after other archive format tests such as RAR, 7z, GZip, etc...
In ArchiveFactory: https://github.com/adamhathcock/sharpcompress/blob/master/SharpCompress/Archive/ArchiveFactory.cs#L129
In ReaderFactory: https://github.com/adamhathcock/sharpcompress/blob/master/SharpCompress/Reader/ReaderFactory.cs#L65
@adamhathcock commented on GitHub (Jan 9, 2016):
Did your suggestion:
21087323af