[PR #891] [MERGED] Fix zip entry handling for entries with data descriptors #1308

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

📋 Pull Request Information

Original PR: https://github.com/adamhathcock/sharpcompress/pull/891
Author: @Morilli
Created: 1/28/2025
Status: Merged
Merged: 1/28/2025
Merged by: @adamhathcock

Base: masterHead: fix-zip-datadescriptor-header


📝 Commits (5)

  • d2cfc18 add failing test
  • c14d18b set local header data from directory header when flag is set
  • 91e672b remove old hack trying to fix a similar thing
  • f9a974c fix formatting
  • 37a2fa1 Merge branch 'master' into fix-zip-datadescriptor-header

📊 Changes

3 files changed (+19 additions, -17 deletions)

View changed files

📝 src/SharpCompress/Common/Zip/SeekableZipFilePart.cs (+1 -17)
📝 src/SharpCompress/Common/Zip/SeekableZipHeaderFactory.cs (+6 -0)
📝 tests/SharpCompress.Test/Zip/ZipArchiveTests.cs (+12 -0)

📄 Description

See the included test for how this issue surfaces. The missing fields in the local header will now be set from the directory header if the UsePostDataDescriptor bit is set in the local header's flags.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/adamhathcock/sharpcompress/pull/891 **Author:** [@Morilli](https://github.com/Morilli) **Created:** 1/28/2025 **Status:** ✅ Merged **Merged:** 1/28/2025 **Merged by:** [@adamhathcock](https://github.com/adamhathcock) **Base:** `master` ← **Head:** `fix-zip-datadescriptor-header` --- ### 📝 Commits (5) - [`d2cfc18`](https://github.com/adamhathcock/sharpcompress/commit/d2cfc1844cdca9e168a50ebc80920362e21f4283) add failing test - [`c14d18b`](https://github.com/adamhathcock/sharpcompress/commit/c14d18b9dfb961d5cd78bc42e89486c5a76f538f) set local header data from directory header when flag is set - [`91e672b`](https://github.com/adamhathcock/sharpcompress/commit/91e672befb94ea8e529a836b44515917973b68bc) remove old hack trying to fix a similar thing - [`f9a974c`](https://github.com/adamhathcock/sharpcompress/commit/f9a974c1fef3bb34c5c08f51699f599b5edeef5c) fix formatting - [`37a2fa1`](https://github.com/adamhathcock/sharpcompress/commit/37a2fa1cdc4822022d209c7dc6d8f55b3dce7dee) Merge branch 'master' into fix-zip-datadescriptor-header ### 📊 Changes **3 files changed** (+19 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `src/SharpCompress/Common/Zip/SeekableZipFilePart.cs` (+1 -17) 📝 `src/SharpCompress/Common/Zip/SeekableZipHeaderFactory.cs` (+6 -0) 📝 `tests/SharpCompress.Test/Zip/ZipArchiveTests.cs` (+12 -0) </details> ### 📄 Description - closes #88 See the included test for how this issue surfaces. The missing fields in the local header will now be set from the directory header if the `UsePostDataDescriptor` bit is set in the local header's flags. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 22:19:54 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#1308