little bug fix

add check if openlp/bibles/resources directory exists and mkdir if not
This commit is contained in:
Armin Köhler 2011-04-21 16:32:04 +02:00
parent b0b127022c
commit 8e1ef8c890
2 changed files with 7 additions and 0 deletions

View File

@ -445,6 +445,7 @@ class BibleReImportForm(OpenLPWizard):
else:
self.verticalWidget[number].hide()
self.formWidget[number].hide()
self.progressBar.show()
self.progressLabelAfter.hide()
self.deleteCheckBox.hide()
self.deleteCheckBox.setCheckState(0)

View File

@ -849,6 +849,12 @@ class AlternativeBookNamesDB(QtCore.QObject, Manager):
database doesn't exist.
"""
if AlternativeBookNamesDB.cursor is None:
if not os.path.exists(os.path.join(
AppLocation.get_directory(AppLocation.DataDir), u'bibles',
u'resources')):
os.mkdir(os.path.join(
AppLocation.get_directory(AppLocation.DataDir), u'bibles',
u'resources'))
filepath = os.path.join(
AppLocation.get_directory(AppLocation.DataDir), u'bibles',
u'resources', u'alternative_book_names.sqlite')