Handle author names that end with a period correctly when saving a single format to disk

This commit is contained in:
Kovid Goyal 2009-07-31 12:08:20 -06:00
parent efe4adfe48
commit bb83f91018

View File

@ -1678,8 +1678,11 @@ books_series_link feeds
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):