View Single Post
Old 02-29-2016, 03:27 AM   #10
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,475
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Purple Lady View Post
These are on my Fire HD 8.

I tried to backup my settings and db to the external SD card and it failed with an error asking if the file was read only.
This is by design. I thought that it would be too much trouble to incorporate the SAF into that dialog. I will revisit that.

If I don't incorporate the SAF then CC shouldn't let you navigate up from main memory. I will fix that. I will also add a comment to the Settings page saying that one can only backup to and restore from main memory, and if you want the backup on an SD card you must copy the file there yourself.
Quote:
I successfully moved my mobi and azw3 books to the external SD card, but when I moved them back got the error in the screenshot. The files left behind on the external SD card do not have a period as the last character in the folder.
Ahh, another take on the same path problem, and one I should have anticipated.

For whatever reason you have books in your library that have "invalid" paths (paths with trailing periods in folder names). When CC moves books, it does not regenerate the path from the template but instead uses the existing path. Something in Android is stripping the trailing periods when the folders are created on the SD card, meaning that CC and Android now disagree about the path. Somehow CC is still able to open the book to copy it back to main memory, but it is not able to delete the book because of the folder name mismatch.

I see two ways to fix this:
  1. Regenerate the path using the current template. Although this would guarantee a correct path, it could change the path in very significant ways. It also isn't clear what would happen if a user is depending on calibre templates.
  2. "Clean" the path and store the cleaned version back with the book. This has the advantage of minimal change, but is slightly more complicated internally.
Both have the consequence that if you move the books back to main memory then the resulting path will be different from the original. The trailing periods will be gone. I prefer choice 2.
chaley is offline   Reply With Quote