forked from LBRYCommunity/lbry-sdk
check from final size instead of partials
This commit is contained in:
parent
8a69ec062e
commit
6f5a595975
1 changed files with 2 additions and 2 deletions
|
@ -138,10 +138,10 @@ class HeadersComponent(Component):
|
|||
if response.status == 406 or response.content_length < self.headers.header_size: # our file is bigger
|
||||
log.warning("s3 is more out of date than we are")
|
||||
return
|
||||
if response.content_length % self.headers.header_size != 0:
|
||||
final_size_after_download = response.content_length + local_header_size
|
||||
if final_size_after_download % self.headers.header_size != 0:
|
||||
log.warning("s3 appears to have corrupted header")
|
||||
return
|
||||
final_size_after_download = response.content_length + local_header_size
|
||||
write_mode = "wb"
|
||||
if local_header_size > 0:
|
||||
log.info("Resuming download of %i bytes from s3", response.content_length)
|
||||
|
|
Loading…
Reference in a new issue