Skip to content

Regression: ArchiveFactory.IsArchive throws on non archive files in 0.42.0 #1064

@ImoutoChan

Description

@ImoutoChan

Version: 0.42.0

Calling ArchiveFactory.IsArchive on simple non-archive file throws InvalidDataException.
Works fine on 0.41.0

System.IO.InvalidDataException: Not an ARJ file (wrong magic bytes)
   at SharpCompress.Common.Arj.Headers.ArjHeader.ReadHeader(Stream stream) in /_/src/SharpCompress/Common/Arj/Headers/ArjHeader.cs:line 46
   at SharpCompress.Common.Arj.Headers.ArjMainHeader.Read(Stream stream) in /_/src/SharpCompress/Common/Arj/Headers/ArjMainHeader.cs:line 43
   at SharpCompress.Factories.ArjFactory.IsArchive(Stream stream, String password, Int32 bufferSize) in /_/src/SharpCompress/Factories/ArjFactory.cs:line 32
   at SharpCompress.Archives.ArchiveFactory.IsArchive(Stream stream, Nullable`1& type, Int32 bufferSize) in /_/src/SharpCompress/Archives/ArchiveFactory.cs:line 198
   at SharpCompress.Archives.ArchiveFactory.IsArchive(String filePath, Nullable`1& type, Int32 bufferSize) in /_/src/SharpCompress/Archives/ArchiveFactory.cs:line 177

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions