mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
[PR #877] [MERGED] Fixed bug in zip time header flags #1300
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/877
Author: @StarkDirewolf
Created: 10/26/2024
Status: ✅ Merged
Merged: 11/1/2024
Merged by: @adamhathcock
Base:
master← Head:master📝 Commits (2)
ab5af40Fixed bug in zip time header flags, and failing to parse it no longer throws an exception.0faa176Sharpier styling📊 Changes
2 files changed (+36 additions, -9 deletions)
View changed files
📝
src/SharpCompress/Common/Zip/Headers/LocalEntryHeaderExtraFactory.cs(+15 -6)📝
src/SharpCompress/Common/Zip/ZipEntry.cs(+21 -3)📄 Description
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 thanLastModifiedTimewhich returns a localDateTime.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.