Hi guys,
can anyone responsible for the release do this change in the future releases?
file: check_fix.py
function: check_and_update_file_sizes
original line:
db_size = db.sizeof_format(book_id, fmt, index_is_id=True)
replace by:
db_size = next(db.backend.execute( "SELECT uncompressed_size FROM data WHERE book=? AND format=?", ( book_id, fmt ) ))[0]
Without this change Calibre never consults db_size actually, as sizeof_format is touching disk, not db.
How to test the functionality:
a) Add any ebook to calibre
b) Manually modify the filesize on the disk in calibre's storage folder
c) Check by Quality Check/Fix/Check and repair book sizes - the original code does not find any difference, the fixed code finds one and fixes it.
|