mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-30 11:13:02 +02: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
1 changed files with 5 additions and 1 deletions
|
|
@ -75,7 +75,11 @@ def accept(self):
|
|||
action = 'existing'
|
||||
elif self.empty_library.isChecked():
|
||||
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,
|
||||
loc):
|
||||
return
|
||||
|
|
|
|||
Loading…
Reference in a new issue