diff --git a/libarchive/__init__.py b/libarchive/__init__.py index ec8c2d8..ed8010f 100644 --- a/libarchive/__init__.py +++ b/libarchive/__init__.py @@ -160,7 +160,7 @@ def is_archive(f, formats=(None, ), filters=(None, )): format(s)/filter(s).''' need_close : bool = False if isinstance(f, str): - f = open(f, 'r') + f = open(f, 'rb') need_close = True a = _libarchive.archive_read_new() for format in formats: