kovidgoyal/calibre — pull request #331 by Polyfun (2014-11-13 08:24:36+00:00)
Title: Fixed "database disk image is malformed" error when sending a large numb...

...er of books to idevices.

Fixed _afc_file_read to continuing reading bytes until all bytes are
read up to the requested file length; the first read only returns the
first 0x400000 bytes, so any files larger than that were not being fully
read. The missing bytes were initialised to null in the target file,
resulting in a corrupt file (the local copy of the Marvin sqlite
database).