save only epub on disc using one folder file-name-error

Bug #821912 reported by drMerry
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

I used the function save only epub on disc using one folder.
When the select folder window was opened, the default location was my desktop.
I pressed ok directly (so no folder was mentioned in the select folder input box)

The book was copied correctly.
It was named:

g_c-exception!_single_'}'_encountered_in_format_string.epub

Related branches

Revision history for this message
drMerry (invullen) wrote :

the used format-string in my settings is:

{author_sort}/{series:||/}{title} - {authors}

Revision history for this message
drMerry (invullen) wrote :

This is no help - request for a good format-string.
I think the default action should be to name the book in the same way as it is done in calibre, excluding the id.

Revision history for this message
Charles Haley (cbhaley) wrote :

IMO, this is not a bug. When saving a single format, only the last component of the path is used. Calibre finds that component by splitting the path on slashes. In your case, the slash in the middle of the template caused the template to be split. Because saving is done in a separate job, the only way to signal the error is to write it into the path.

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

@charles: It should be possible for the the template processing system to raise an exception, which would cause the saving of that file to fail. That error would then be reported to the user once the saving job has run.

Revision history for this message
Charles Haley (cbhaley) wrote :

It has been a given that template processing would never throw an exception. I am nervous about changing that. However...

I have changed save-to-disk to use an unsafe formatter. Any exceptions tossed during template processing will now propagate out and, one hopes, be handled correctly

Changed in calibre:
status: New → Fix Committed
Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in lp:calibre

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

 status fixreleased

Changed in calibre:
status: Fix Committed → Fix Released
Revision history for this message
drMerry (invullen) wrote :

If you want, you can contact me using and I will test it in the new release.

Thanks you for the fix

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.