Browse Source

open archive in binary mode

test_fixup
Vadim Lebedev 2 years ago
parent
commit
546d89852e
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libarchive/__init__.py

+ 1
- 1
libarchive/__init__.py View File

@@ -160,7 +160,7 @@ def is_archive(f, formats=(None, ), filters=(None, )):
format(s)/filter(s).''' format(s)/filter(s).'''
need_close : bool = False need_close : bool = False
if isinstance(f, str): if isinstance(f, str):
f = open(f, 'r')
f = open(f, 'rb')
need_close = True need_close = True
a = _libarchive.archive_read_new() a = _libarchive.archive_read_new()
for format in formats: for format in formats:


Loading…
Cancel
Save