mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 14:25:41 +02:00
Show error message if user selects non existing folder in choose library dialog
This commit is contained in:
parent
78f14b5500
commit
8dbced9063
1 changed files with 4 additions and 2 deletions
|
|
@ -80,8 +80,10 @@ def accept(self):
|
|||
return error_dialog(self, _('No location'), _('No location selected'),
|
||||
show=True)
|
||||
loc = os.path.abspath(text)
|
||||
if not loc or not os.path.exists(loc) or not self.check_action(action,
|
||||
loc):
|
||||
if not loc or not os.path.exists(loc) or not os.path.isdir(loc):
|
||||
return error_dialog(self, _('Bad location'),
|
||||
_('%s is not an existing folder')%loc, show=True)
|
||||
if not self.check_action(action, loc):
|
||||
return
|
||||
QDialog.accept(self)
|
||||
self.location.save_history()
|
||||
|
|
|
|||
Loading…
Reference in a new issue