DLC sometimes comes as non-v0 and are handled incorrectly
jockebr opened this issue · 1 comments
It happens rarely, but sometimes DLC have updated versions (v0 and v65536 or higher) and when using --rm-old-version
the detection logic seems to incorrectly deem them to be updates and error out.
Using command line: nsz.py -C --verify --parseCnmt --rm-old-version --rm-source *.nsp
Example error:
Error while compressing file: /path/Some DLC [0100xxxxxxxxx011] [v65536].nsp
Traceback (most recent call last):
File "/path/nsz/nsz/__init__.py", line 161, in main
if not AllowedToWriteOutfile(filePath, ".nsz", targetDictNsz[outFolder], args):
File "/path/nsz/nsz/FileExistingChecks.py", line 121, in AllowedToWriteOutfile
raise ValueError("rm-old-version: A titleID containing updates should never have any version v0 with the same titleID!")
ValueError: rm-old-version: A titleID containing updates should never have any version v0 with the same titleID!
Note there exists both a v0 and v65536 of this DLC title id in this directory.
Omitting --rm-old-version
works around the problem.
Thanks a lot for reporting this. I wasn’t aware that there are v0 DLCs. I now removed the safety check that prevents v0 titles to be deleted if there is an update for it. The original purpose of this safety check was to protect base titles in the unlikely case there is a titleID naming issue.