Skip to content

Commit f0d0fed

Browse files
committed
Use the force on mpyq to always decompress message.events files.
1 parent 49376c5 commit f0d0fed

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sc2reader/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ def make_replay(self, replay_file, **options):
122122

123123
# To wrap mpyq exceptions we have to do this try hack.
124124
try:
125-
filedata = archive.read_file(file)
125+
# We are currently assuming that the message file is always compressed
126+
if file == 'replay.message.events':
127+
filedata = archive.read_file(file, force_decompress=True)
128+
else:
129+
filedata = archive.read_file(file)
126130
except KeyboardInterrupt: raise
127131
except:
128132
raise exceptions.MPQError("Unable to extract file: {0}".format(file))

0 commit comments

Comments
 (0)