mirror of
https://github.com/elliotnunn/ToolboxToolbox.git
synced 2025-01-02 14:29:25 +00:00
Flattener: allow raw resource fork
This commit is contained in:
parent
dec9fc4637
commit
22c19bbfdf
@ -17,7 +17,11 @@ args.rtype = args.rt.partition('=')[0].encode('mac_roman')
|
||||
args.rid = int(args.rt.partition('=')[2])
|
||||
|
||||
with open(args.src, 'rb') as f:
|
||||
resources = list(macresources.parse_rez_code(f.read(), original_file=f.name))
|
||||
d = f.read()
|
||||
if f.name.endswith('.rdump'):
|
||||
resources = list(macresources.parse_rez_code(d, original_file=f.name))
|
||||
else:
|
||||
resources = list(macresources.parse_file(d))
|
||||
|
||||
resources = [r for r in resources if r.type == args.rtype and r.id >= args.rid]
|
||||
resources.sort(key=lambda r: r.id)
|
||||
|
Loading…
Reference in New Issue
Block a user