adamhathcock / sharpcompress

SharpCompress is a fully managed C# library to deal with many compression types and formats.
MIT License
2.29k stars 482 forks source link

Fixed bug in zip time header flags #877

Closed StarkDirewolf closed 3 weeks ago

StarkDirewolf commented 1 month ago

Parsing the times in the zip headers worked, but the flag check was wrong, so only modified time was ever parsed. Corrected this in a more readable way.

Also stopped exceptions being thrown if there was an issue during this header parsing, returning null values instead.

Remarks have been added to highlight that they return UTC DateTime's, rather than LastModifiedTime which returns a local DateTime.

adamhathcock commented 3 weeks ago

Looks good, thanks!

adamhathcock commented 3 weeks ago

Needs a format it seems: dotnet csharpier .

StarkDirewolf commented 3 weeks ago

Ah, thanks for letting me know :) Pushed the styling change.