View Single Post
Old 06-19-2020, 01:29 PM   #10
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,988
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Okay, I believe I've tracked down this problem and I believe that it is with the Calibre Companion android app.

It looks like CC, when writing an epub that already exists, overwrites the existing file but doesn't truncate the file if the new epub is shorter.

I'll spare you the details of how I got there and just tell you about the proof. I added debug output Calibre to report the bytes sent, and save the temp epub created to be sent.

After picking one epub, I:
  1. Made a file of all zeros, longer than the epub;
  2. Put it in place in CC's directory for that epub;
  3. Sent that epub to CC via wireless device;
  4. Confirmed that the epub in CC's dir had not shrunk;
  5. Confirmed that the file in CC's dir contained the same bytes as the sent epub, followed by zeros out to the length of the all-zeros file I had written.

I ran the same test on koreader and did not see this issue.

Before you ask, I have checked and in all the cases I can still find the files for, the epub was legitimately shorter due to text or cover image changes.

The only user-level work around I see right now is to explicitly delete each book before sending it.

If there is a better place I should be reporting this to make sure the new CC team see it, please let me know.
JimmXinu is offline   Reply With Quote