From a206377979c91a7dca2ebd3c2babd785b91bd1e2 Mon Sep 17 00:00:00 2001 From: Stephen Checkley Date: Thu, 21 Nov 2024 00:08:51 +0000 Subject: [PATCH 1/2] modified flowsettings to incorporate an IF statement to determine pre-existing data directory --- flowsettings.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flowsettings.py b/flowsettings.py index c4bb74e4..a3a0a0b1 100644 --- a/flowsettings.py +++ b/flowsettings.py @@ -30,8 +30,9 @@ # App can be ran from anywhere and it's not trivial to decide where to store app data. # So let's use the same directory as the flowsetting.py file. KH_APP_DATA_DIR = this_dir / "ktem_app_data" -KH_APP_DATA_EXISTS = KH_APP_DATA_DIR.exists() -KH_APP_DATA_DIR.mkdir(parents=True, exist_ok=True) +# KH_APP_DATA_EXISTS = KH_APP_DATA_DIR.exists() +if not KH_APP_DATA_DIR.exists(): + KH_APP_DATA_DIR.mkdir(parents=True, exist_ok=True) # User data directory KH_USER_DATA_DIR = KH_APP_DATA_DIR / "user_data" From 363a71533810233bba5a90c774a6e6537d58545f Mon Sep 17 00:00:00 2001 From: scheckley Date: Thu, 21 Nov 2024 00:48:02 +0000 Subject: [PATCH 2/2] uncommented KH_DATA_DIR which is needed in app.py --- flowsettings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flowsettings.py b/flowsettings.py index a3a0a0b1..a3f5a79c 100644 --- a/flowsettings.py +++ b/flowsettings.py @@ -30,7 +30,7 @@ # App can be ran from anywhere and it's not trivial to decide where to store app data. # So let's use the same directory as the flowsetting.py file. KH_APP_DATA_DIR = this_dir / "ktem_app_data" -# KH_APP_DATA_EXISTS = KH_APP_DATA_DIR.exists() +KH_APP_DATA_EXISTS = KH_APP_DATA_DIR.exists() if not KH_APP_DATA_DIR.exists(): KH_APP_DATA_DIR.mkdir(parents=True, exist_ok=True)