mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Show error message if user selects non existing folder in choose library dialog
This commit is contained in:
parent
78f14b5500
commit
8dbced9063
@ -80,8 +80,10 @@ class ChooseLibrary(QDialog, Ui_Dialog):
|
|||||||
return error_dialog(self, _('No location'), _('No location selected'),
|
return error_dialog(self, _('No location'), _('No location selected'),
|
||||||
show=True)
|
show=True)
|
||||||
loc = os.path.abspath(text)
|
loc = os.path.abspath(text)
|
||||||
if not loc or not os.path.exists(loc) or not self.check_action(action,
|
if not loc or not os.path.exists(loc) or not os.path.isdir(loc):
|
||||||
loc):
|
return error_dialog(self, _('Bad location'),
|
||||||
|
_('%s is not an existing folder')%loc, show=True)
|
||||||
|
if not self.check_action(action, loc):
|
||||||
return
|
return
|
||||||
QDialog.accept(self)
|
QDialog.accept(self)
|
||||||
self.location.save_history()
|
self.location.save_history()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user