File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -177,8 +177,8 @@ def read(self, __size: int = 0) -> bytes:
177177 if chunk_end > self .size ():
178178 chunk_end = int (self .size () / (128 * 1024 ))
179179 chunk_end_off = int (self .size () % (128 * 1024 ))
180+ self .check_availability (chunk , True , False )
180181 if chunk_off + __size > len (self .buffer ()[chunk ]):
181- self .check_availability (chunk , True , False )
182182 buffer .write (self .buffer ()[chunk ][chunk_off :])
183183 chunk += 1
184184 while chunk <= chunk_end :
@@ -189,7 +189,6 @@ def read(self, __size: int = 0) -> bytes:
189189 buffer .write (self .buffer ()[chunk ])
190190 chunk += 1
191191 else :
192- self .check_availability (chunk , True , False )
193192 buffer .write (self .buffer ()[chunk ][chunk_off :chunk_off + __size ])
194193 buffer .seek (0 )
195194 self .__pos += buffer .getbuffer ().nbytes
You can’t perform that action at this time.
0 commit comments