I was trying to manually update a (listfile) but kept getting failures with StormLib. I believe StormLib instead wants to manage this and do the (listfile) update manually.
I found this history saying some files are protected:
https://github.com/ladislav-zezula/StormLib/blob/539a04e06578ce9b0cf005446eff66e18753076d/doc/History.txt#L44-L48These include: - The only operation that is externally allowed to do with internal files
("(listfile)", "(attributes)" and "(signature)") is reading. Attempt to modify any of the file
fails and GetLastError returns ERROR_INTERNAL_FILE
Ok that explains my errors. But what if I need to modify any of those files directly? Do I need to rebuild StormLib and remove those protections?
None.
The latest versions of StormLib can modify listfiles just fine, e.g.
https://github.com/TheNitesWhoSay/Chkdraft/blob/master/MappingCoreLib/MpqFile.cpp#L135
TheNitesWhoSay - Clan Aura -
githubReached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.
Thanks jff28.
Just closing this out, you should never need to modify listfile or other protected files directly. StormLib will update these files automatically when you add or remove files from the MPQ archive. You can verify this by adding a file, saving the archive, and then extract the listfile. It should be updated for you!
None.