gentoo-overlay/app-office/jal/files/jal-2024.1.3-dbfilepath.patch

15 lines
785 B
Diff

diff -ur jal-2024.1.3.old/jal/db/helpers.py jal-2024.1.3.new/jal/db/helpers.py
--- jal-2024.1.3.old/jal/db/helpers.py 2024-01-19 15:34:59.000000000 +0300
+++ jal-2024.1.3.new/jal/db/helpers.py 2024-08-18 14:50:56.957916611 +0300
@@ -79,7 +79,9 @@
# -------------------------------------------------------------------------------------------------------------------
def get_dbfilename(app_path):
- return app_path + Setup.DB_PATH
+ DBfilepath = os.path.expanduser('~') + '/.jal/' + Setup.DB_PATH
+ os.makedirs(os.path.dirname(DBfilepath), exist_ok=True)
+ return DBfilepath
# -------------------------------------------------------------------------------------------------------------------
# Return a row from the model in form of {"field_name": value} dictionary