-
-
Save anonymous/10c11792c0b37ec3693bf9494017a3aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This code fixes the issue, but I can't make it work with | |
QtWidgets.QMessageBox.No/Yes. | |
\openlp\core\common\applocation.py | |
@staticmethod | |
def get_data_path(): | |
""" | |
Return the path OpenLP stores all its data under. | |
""" | |
from openlp.core.lib.ui import critical_error_message_box | |
from openlp.core.common import AppLocation, Settings, translate | |
# Check if we have a different data location. | |
if Settings().contains('advanced/data path'): | |
path = Settings().value('advanced/data path') | |
if not os.path.exists(path): | |
critical_error_message_box(translate('OpenLP.Manager', 'Database Error'), | |
translate('OpenLP.Manager', | |
'OpenLP cannot load your database.\n\nDatabase:')) | |
Settings().remove('advanced/data path') | |
path = AppLocation.get_directory(AppLocation.DataDir) | |
check_directory_exists(path) | |
else: | |
path = AppLocation.get_directory(AppLocation.DataDir) | |
check_directory_exists(path) | |
return os.path.normpath(path) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment