mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-06 09:24:33 +01:00
Handle author names that end with a period correctly when saving a single format to disk
This commit is contained in:
parent
efe4adfe48
commit
bb83f91018
1 changed files with 4 additions and 1 deletions
|
|
@ -1678,8 +1678,11 @@ def export_single_format_to_dir(self, dir, indices, format,
|
|||
au = self.authors(id, index_is_id=True)
|
||||
if not au:
|
||||
au = _('Unknown')
|
||||
fname = '%s - %s.%s'%(title, au, format.lower())
|
||||
fname = '%s - %s'%(title, au)
|
||||
while fname.endswith('.'):
|
||||
fname = fname[:-1]
|
||||
fname = ascii_filename(fname)
|
||||
fname = fname + '.' + format.lower()
|
||||
dir = os.path.abspath(dir)
|
||||
fname = shorten_components_to(plen - len(dir), (fname,))[0]
|
||||
if not os.path.exists(dir):
|
||||
|
|
|
|||
Loading…
Reference in a new issue