diff --git a/src/calibre/gui2/dialogs/choose_library.py b/src/calibre/gui2/dialogs/choose_library.py index bf1741cd87..32d45c6043 100644 --- a/src/calibre/gui2/dialogs/choose_library.py +++ b/src/calibre/gui2/dialogs/choose_library.py @@ -80,8 +80,10 @@ class ChooseLibrary(QDialog, Ui_Dialog): 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()