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

15 lines
779 B
Diff
Raw Normal View History

2024-08-18 09:36:38 +03:00
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: