mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
When choosing new library location, if no location is selected and OK is clicked, don't try to use the home directory as the location
This commit is contained in:
parent
551a1ca272
commit
99e238f90e
@ -75,7 +75,11 @@ class ChooseLibrary(QDialog, Ui_Dialog):
|
|||||||
action = 'existing'
|
action = 'existing'
|
||||||
elif self.empty_library.isChecked():
|
elif self.empty_library.isChecked():
|
||||||
action = 'new'
|
action = 'new'
|
||||||
loc = os.path.abspath(unicode(self.location.text()).strip())
|
text = unicode(self.location.text()).strip()
|
||||||
|
if not text:
|
||||||
|
return error_dialog(self, _('No location'), _('No location selected'),
|
||||||
|
show=True)
|
||||||
|
loc = os.path.abspath()
|
||||||
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 self.check_action(action,
|
||||||
loc):
|
loc):
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user