kovidgoyal/calibre — pull request #333 by Polyfun (2014-11-15 12:49:22+00:00)
Title: Fixed libimobiledevice _afc_file_write wrapper to loop until all bytes are written.

_afc_file_write is used by the idevice interface to copy files to the
idevice. This fix has been successfully tested by round tripping a 500
MB file from the PC to the device and back again, and checking that the
before and after files are identical.