From c588de84f354cf8ec1320925cd75b08b552b9af3 Mon Sep 17 00:00:00 2001 From: Chuck <33324927+ChuckBuilds@users.noreply.github.com> Date: Tue, 22 Jul 2025 21:02:47 -0500 Subject: [PATCH] file path name fix to remove duplicate folder name --- src/of_the_day_manager.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/of_the_day_manager.py b/src/of_the_day_manager.py index f8cd1a5a..377f7167 100644 --- a/src/of_the_day_manager.py +++ b/src/of_the_day_manager.py @@ -78,7 +78,11 @@ class OfTheDayManager: # Try relative path first, then absolute file_path = data_file if not os.path.isabs(file_path): - file_path = os.path.join(os.path.dirname(__file__), '..', 'of_the_day', data_file) + # If data_file already contains 'of_the_day/', use it as is + if data_file.startswith('of_the_day/'): + file_path = os.path.join(os.path.dirname(__file__), '..', data_file) + else: + file_path = os.path.join(os.path.dirname(__file__), '..', 'of_the_day', data_file) if os.path.exists(file_path): with open(file_path, 'r', encoding='utf-8') as f: