And I think I figured out why you were getting the restore failure even though your library path was shorter than 89 chars. The restore process creates a temporary library, I'm guessing that the path to the temp folder was longer than 89 chars on your system. IIRC this can happen if your username is very long as the temp folder is typically, some thing like
C:\Users\username\AppData\Local\Temp\calibre_XXXXX X\XXXXXX_library_restore
which is already 75 characters.
I have shortened that path to
C:\Users\username\AppData\Local\Temp\calibre_XXXXX X\XXXXXX_rlib
which saves 11 characters
EDIT: I've further changed the code to first try to create the temp library in the parent folder of the library you are tring to restore, and only if that fails, to use the temporary directory. That should make it much more robust.
Last edited by kovidgoyal; 10-20-2013 at 12:12 AM.
|