mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix bug in lrf-meta that could cause corrupted LRF files when setting metadata.
This commit is contained in:
parent
3cf05b8f66
commit
0b0346884f
@ -375,6 +375,7 @@ class LRFMetaFile(object):
|
|||||||
delta = insert_into_file(self._file, stream, self.info_start, \
|
delta = insert_into_file(self._file, stream, self.info_start, \
|
||||||
self.info_start + orig_size - 4)
|
self.info_start + orig_size - 4)
|
||||||
|
|
||||||
|
if self.toc_object_offset > 0:
|
||||||
self.toc_object_offset += delta
|
self.toc_object_offset += delta
|
||||||
self.object_index_offset += delta
|
self.object_index_offset += delta
|
||||||
self.update_object_offsets(delta)
|
self.update_object_offsets(delta)
|
||||||
@ -685,3 +686,4 @@ def main(args=sys.argv):
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
sys.exit(main())
|
sys.exit(main())
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user