diff options
-rw-r--r-- | src/wii/u8archive.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wii/u8archive.py b/src/wii/u8archive.py index faad114..9ae1ef5 100644 --- a/src/wii/u8archive.py +++ b/src/wii/u8archive.py @@ -19,7 +19,10 @@ class WiiArchiveU8: if handle: if not hasattr(handle, 'read'): - handle = cStringIO.StringIO(handle) + if handle[0:4] == "U\xAA8\x2D": + handle = cStringIO.StringIO(handle) + else: + handle = open(handle, 'rb') info = WiiArchiveU8.ReadInfo() info.startPos = handle.tell() |