From 8c1fcf6be6401a40819efdfc0262d6dc96bb4b00 Mon Sep 17 00:00:00 2001 From: eliranwong Date: Sat, 26 Oct 2024 21:20:17 +0000 Subject: [PATCH] fixed a startup issue --- setup.py | 2 +- uniquebible/util/ConfigUtil.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 122008e095..e6467d66e6 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ # https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/ setup( name=package, - version="0.1.21", + version="0.1.22", python_requires=">=3.8, <3.13", description=f"UniqueBible App is a cross-platform & offline bible application, integrated with high-quality resources and unique features. Developers: Eliran Wong and Oliver Tseng", long_description=long_description, diff --git a/uniquebible/util/ConfigUtil.py b/uniquebible/util/ConfigUtil.py index c44111820f..b6edcb7d1f 100644 --- a/uniquebible/util/ConfigUtil.py +++ b/uniquebible/util/ConfigUtil.py @@ -62,10 +62,6 @@ def setup(noQt=None, cli=None, enableCli=None, enableApiServer=None, enableHttpS ubaUserDir = os.path.join(os.path.expanduser("~"), "UniqueBible") config.ubaUserDir = ubaUserDir if os.path.isdir(ubaUserDir) else os.getcwd() config.packageDir = str(importlib.resources.files("uniquebible")) - - userMarvelData = os.path.join(config.ubaUserDir, "marvelData") - if config.marvelData == "marvelData" and os.path.isdir(userMarvelData): - config.marvelData = userMarvelData # check running mode config.runMode = sys.argv[1] if len(sys.argv) > 1 else "" @@ -825,7 +821,11 @@ def getCurrentVenvDir(): config.help["marvelData"] = """ # Specify the folder path of resources""" if not hasattr(config, "marvelData") or not os.path.isdir(config.marvelData): - config.marvelData = "marvelData" + userMarvelData = os.path.join(config.ubaUserDir, "marvelData") + if os.path.isdir(userMarvelData): + config.marvelData = userMarvelData + else: + config.marvelData = "marvelData" config.help["marvelDataPublic"] = """ # Public marvelData Directory.""" if not hasattr(config, "marvelDataPublic") or not os.path.isdir(config.marvelData):