diff --git a/src/calibre/gui2/dialogs/choose_library.py b/src/calibre/gui2/dialogs/choose_library.py index fc08c3ee14..535c729419 100644 --- a/src/calibre/gui2/dialogs/choose_library.py +++ b/src/calibre/gui2/dialogs/choose_library.py @@ -180,8 +180,11 @@ class ChooseLibrary(QDialog, Ui_Dialog): if e.errno != errno.EEXIST: raise 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 action == 'new' and not os.path.exists(loc): + os.makedirs(loc) + else: + return error_dialog(self, _('Bad location'), + _('%s is not an existing folder')%loc, show=True) if not self.check_action(action, loc): return self.location.save_history()