mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-21 19:45:10 +00:00
texrename: handle multiple files with the same CRC too
This commit is contained in:
parent
a0a256499b
commit
85a1d88422
1 changed files with 3 additions and 3 deletions
|
@ -40,7 +40,7 @@ except OSError as e:
|
|||
sys.exit(2)
|
||||
|
||||
# load the CRC map
|
||||
crcmap = dict()
|
||||
crcmap = list()
|
||||
try:
|
||||
with open(mapfname, 'r') as f:
|
||||
for line in f:
|
||||
|
@ -53,7 +53,7 @@ try:
|
|||
crc = int(crcstr[2:], 16)
|
||||
else:
|
||||
crc = int(crcstr)
|
||||
crcmap[crc] = os.path.join(outpath, tok[1].strip())
|
||||
crcmap.append((crc, os.path.join(outpath, tok[1].strip())))
|
||||
except OSError as e:
|
||||
print('could not open {0}: {1}'.format(mapfname, e))
|
||||
except ValueError as e:
|
||||
|
@ -61,7 +61,7 @@ except ValueError as e:
|
|||
sys.exit(3)
|
||||
|
||||
# copy the files to the correct locations
|
||||
for crc, path in crcmap.items():
|
||||
for (crc, path) in crcmap:
|
||||
if not (crc in texmap):
|
||||
print('unmatched CRC: {0} ({1})'.format(crc, path))
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue