file and folder names garbled if too long in "save to disk".

Bug #2038238 reported by irfan ali khan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

using the 'save to disk' feature, with this protocol:

{authors}/{Series}/{series_index:0>2s|Vol | - }{pubdate:0>2s|| - }{title}/{title}

If the title/author names are long, the folder and filenames become oddly truncated. There is allowance for 255 characters in file names in ext4 and btrfs.

Example Book details:
title: Dealing: Or, the Berkeley-To-Boston Forty-Brick Lost-Bag Blues
author: Michael Crichton & Douglas Crichton & Michael Douglas
series: The Med School Years Series #1

total characters = 147.

folder structure looks like this:
Michael Crichton & Michael Douglas
Med School Years Series, The
Vol 01 - 2013 - Dealing_ Or, theoston Forty-Brick Lost-Bag Blues
Dealing_ Or, the Berkeley-Forty-Brick Lost-Bag Blues.epub

which altogether is 183 characters. i believe only the longest file/folder name needs to be less than 255 characters, (if that is what is causing this garbling/truncation)

That would be this line:
Vol 01 - 2013 - Dealing: Or, the Berkeley-To-Boston Forty-Brick Lost-Bag Blues
which is still only 79 characters.

This has been a very useful feature for me to output the folders in a format where folders = metadata for databaseing. hopefully this bug can be resolved, thank you so much in advance! enjoying calibre, very convenient tool!

Revision history for this message
Kovid Goyal (kovid) wrote :

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

Changed in calibre:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.