Opening 7zip archive with invalid win32 date #168

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

Originally created by @Thritton on GitHub (Apr 28, 2017).

Hello,
Sharpcompress library is very good, thank you for it.

I have a problem with opening 7z achives where one of file has invalid modified date (e.g. 27.2.27586) (These archives are generated automatically from other system I cannot access).
When such file is in 7zip archive, ArgumentOutOfRangeException is thrown during getting entries. and file cannot be processed further:

using (var archive = ArchiveFactory.Open(f))
{ 
var files = archive.Entries.Select(x => x.Key).ToList();
}

An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll
Additional information: Not a valid Win32 FileTime.

Zip archives with such file work ok (date is ignored).
Is it possible to ignore invalid dates in 7z archive as well?

Thank you

Originally created by @Thritton on GitHub (Apr 28, 2017). Hello, Sharpcompress library is very good, thank you for it. I have a problem with opening 7z achives where one of file has invalid modified date (e.g. 27.2.27586) (These archives are generated automatically from other system I cannot access). When such file is in 7zip archive, ArgumentOutOfRangeException is thrown during getting entries. and file cannot be processed further: ``` using (var archive = ArchiveFactory.Open(f)) { var files = archive.Entries.Select(x => x.Key).ToList(); } An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll Additional information: Not a valid Win32 FileTime. ``` Zip archives with such file work ok (date is ignored). Is it possible to ignore invalid dates in 7z archive as well? Thank you
claunia added the bug label 2026-01-29 22:07:43 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#168