Cython: fixed a bug when reading an uncompressed file in binary mode
where the first 4 characters would not be read
This commit is contained in:
@ -99,6 +99,8 @@ cdef class CompressedFile:
|
|||||||
self.accessor = c(magic)
|
self.accessor = c(magic)
|
||||||
|
|
||||||
if self.accessor is None:
|
if self.accessor is None:
|
||||||
|
if 'b' in magic.stream_mode:
|
||||||
|
magic.binary.seek(0)
|
||||||
self.accessor = magic
|
self.accessor = magic
|
||||||
|
|
||||||
if ((hasattr(stream, 'headers') and
|
if ((hasattr(stream, 'headers') and
|
||||||
|
Reference in New Issue
Block a user