mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #2821 (Non user-friendly error message when attempting to save metadata of open file)
This commit is contained in:
parent
a008de7c4e
commit
958bdb549e
@ -550,6 +550,7 @@ class MetadataSingleDialog(ResizableDialog, Ui_MetadataSingleDialog):
|
||||
if self.formats_changed:
|
||||
self.sync_formats()
|
||||
title = unicode(self.title.text())
|
||||
self.db.set_title(self.id, title, notify=False)
|
||||
except IOError, err:
|
||||
if err.errno == 13: # Permission denied
|
||||
fname = err.filename if err.filename else 'file'
|
||||
@ -557,7 +558,6 @@ class MetadataSingleDialog(ResizableDialog, Ui_MetadataSingleDialog):
|
||||
_('Could not open %s. Is it being used by another'
|
||||
' program?')%fname, show=True)
|
||||
raise
|
||||
self.db.set_title(self.id, title, notify=False)
|
||||
au = unicode(self.authors.text())
|
||||
if au:
|
||||
self.db.set_authors(self.id, string_to_authors(au), notify=False)
|
||||
|
Loading…
x
Reference in New Issue
Block a user