Skip to content

Commit

Permalink
Use the last block index in the file, in case the last data block als…
Browse files Browse the repository at this point in the history
…o contains something that looks like a block index [asdf-format#989]
  • Loading branch information
lgarrison committed May 6, 2021
1 parent dd16d15 commit fb6d00c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion asdf/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ def read_block_index(self, fd, ctx):
# Read blocks in reverse order from the end of the file
while True:
# Look for the index header
idx = content.find(constants.INDEX_HEADER)
idx = content.rfind(constants.INDEX_HEADER)
if idx != -1:
content = content[idx:]
index_start = block_start + idx
Expand Down

0 comments on commit fb6d00c

Please sign in to comment.