mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Edit Book: Auto-add file extension when using the Save a Copy dialog if it is missing. Fixes #1627482 [save a copy as EPUB does not add automatically .epub extension to file](https://bugs.launchpad.net/calibre/+bug/1627482)
This commit is contained in:
parent
1d6f518799
commit
237e4a9455
@ -1065,6 +1065,8 @@ class Boss(QObject):
|
||||
filters=[(_('Book (%s)') % ext.upper(), [ext.lower()])], all_files=False)
|
||||
if not path:
|
||||
return
|
||||
if '.' not in os.path.basename(path):
|
||||
path += '.' + ext.lower()
|
||||
tdir = self.mkdtemp(prefix='save-copy-')
|
||||
container = clone_container(c, tdir)
|
||||
for name, ed in editors.iteritems():
|
||||
|
Loading…
x
Reference in New Issue
Block a user