Adding option to provide listfiles to the 'extract' and 'list' commmands#31
Merged
thomaslaurenson merged 1 commit intoTheGrayDot:mainfrom Mar 26, 2025
Merged
Adding option to provide listfiles to the 'extract' and 'list' commmands#31thomaslaurenson merged 1 commit intoTheGrayDot:mainfrom
thomaslaurenson merged 1 commit intoTheGrayDot:mainfrom
Conversation
Collaborator
|
This looks great - thanks for the PR. Will do a test and check functionality, but looks good from looking at the code. |
thomaslaurenson
approved these changes
Mar 26, 2025
Collaborator
thomaslaurenson
left a comment
There was a problem hiding this comment.
Review - and changes look good. I have tested and working as expected.
Took a while to test because I couldn't find an MPQ without a (listfile). Cannot create an MPQ using Ladik's MPQ Editor because the (listfile) is mandatory - and cannot delete the file after creation. Instead, leveraged SFileCreateArchive2 which uses CreateInfo where you can exclude MPQ_CREATE_LISTFILE.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The MPQ file format don't contain the file names of the files in the archives. By convention, the file names tend to be listed in the file
(listfile), but in older MPQs (from StarCraft I, WarCraft II BNE, Diablo I, etc) that file is missing or incomplete.By providing an external listfile, the user can list or extract files under their correct file paths.
This PR works by setting the
szListFileargument of the SFileFindFirstFile function to the path given by the user.