View Single Post
Old 06-07-2011, 09:40 PM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,378
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The maximum path length of files created by calibre on windows is 165 characters + the number of characters in the file extension and the number of characters in the numerical id (which we can upper bound by 11=5+6 reasonably). In other words the bounding of file lengths assumes file extensions of a max of 6 characters. This limit is imposed by restricting the author length to < 40 and the title length to < 40. 165=40 + 40 + 40 + 40 + 5 (the 5 is for path separators and a space).

When creating a new library calibre will refuse if you try to create a library whose path is longer than 89 characters.

So that gives 165+89+11 = 265 characters. This is actually 5 characters over the limit, so I can change the code for that.

However, the examples you posted are well short of the limits.

'The Lion, the Witch and the Wardrobe_ Re - Claudia Dutcher Tillman.epub' is only 71 characters. Add another 90 for the directory components and you still have only 161 characters. Which leaves over 90 for the library path. Neither of the library paths you posted comes closes to 90 characters in length.

Last edited by kovidgoyal; 06-08-2011 at 10:15 AM.
kovidgoyal is offline   Reply With Quote