Specific error message if file being tweaked does not exist

This commit is contained in:
Kovid Goyal 2013-12-01 13:11:20 +05:30
parent f1fc5598b0
commit 3447684c5e

View File

@ -121,6 +121,9 @@ class Boss(QObject):
_('Tweaking is only supported for books in the %s formats.' _('Tweaking is only supported for books in the %s formats.'
' Convert your book to one of these formats first.') % _(' and ').join(sorted(SUPPORTED)), ' Convert your book to one of these formats first.') % _(' and ').join(sorted(SUPPORTED)),
show=True) show=True)
if not os.path.exists(path):
return error_dialog(self.gui, _('File not found'), _(
'The file %s does not exist.') % path, show=True)
for name in tuple(editors): for name in tuple(editors):
self.close_editor(name) self.close_editor(name)