app-office/jal: add db file path patch

This commit is contained in:
2024-08-18 09:36:38 +03:00
parent 6219b6e558
commit 33cbf1043e
3 changed files with 21 additions and 2 deletions

View File

@@ -0,0 +1,14 @@
diff -ur jal-2024.7.1.orig/jal/db/db.py jal-2024.7.1.new/jal/db/db.py
--- jal-2024.7.1.orig/jal/db/db.py 2024-08-01 00:26:42.000000000 +0300
+++ jal-2024.7.1.new/jal/db/db.py 2024-08-18 09:26:30.292027271 +0300
@@ -104,7 +104,9 @@
if "pytest" in sys.modules:
return os.environ['JAL_TEST_PATH'] + os.sep + Setup.DB_PATH # Use custom path if in test environment
else:
- return JalDB.get_app_path() + Setup.DB_PATH
+ DBfilepath = os.path.expanduser('~') + '/.jal/' + Setup.DB_PATH
+ os.makedirs(os.path.dirname(DBfilepath), exist_ok=True)
+ return DBfilepath
# -------------------------------------------------------------------------------------------------------------------
# This function: