mirror of
https://github.com/mon/ifstools.git
synced 2024-11-13 21:20:49 +01:00
Fix super-file edge case
This commit is contained in:
parent
87241fd540
commit
baf8252e42
@ -57,7 +57,10 @@ class GenericFolder(Node):
|
||||
super_ifs = self.supers[super_ref - 1]
|
||||
super_files = super_ifs.tree.all_files
|
||||
try:
|
||||
super_file = next(x for x in super_files if x.name == filename)
|
||||
super_file = next(x for x in super_files if (
|
||||
# seen in Sunny Park files: references to MD5 name instead of base
|
||||
x.name == filename or x.packed_name == Node.sanitize_name(filename)
|
||||
))
|
||||
except StopIteration:
|
||||
raise IOError('IFS references super-IFS entry {} in {} but it does not exist'.format(filename, super_ifs.ifs_out))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user