Skip to content

Conversation

@jdpurcell
Copy link
Contributor

@jdpurcell jdpurcell commented Mar 9, 2025

Some 7-zip archives have extended attributes to store Unix permissions. This caused problems in the past so the extended attributes were stripped when reading. However, this information can be useful or even critical in some cases, such as when extracting Linux/macOS prebuilt binaries for developing with Qt. These archives have execute permissions set for some files, and some of the files are intended to be created as symbolic links.

This PR provides access to the original full attributes via a new property in SevenZipEntry. The other changes were just small cleanups. Specifically, as I looked at AttribDefined/SetAttrib and wondered if there should be extended versions of these, I saw that these are properties in an internal class an nothing is ever referencing them. I also noticed CrcDefined had only one reference, and around where it was used showed an IDE warning that went away by using HasValue instead, so I thought it would be better to remove it.

image

With this new ExtendedAttrib property, I was able to write an extraction routine that allows the Qt 7-zip archives to be extracted in a fully working state.

@adamhathcock
Copy link
Owner

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants