mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Allow specifying a non-existent folder when creating a new library. The folder is automatically created
This commit is contained in:
parent
b41c55e811
commit
581d15d8eb
@ -180,6 +180,9 @@ 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):
|
||||
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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user