mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-28 03:23:01 +00:00
file path name fix to remove duplicate folder name
This commit is contained in:
@@ -78,6 +78,10 @@ class OfTheDayManager:
|
||||
# Try relative path first, then absolute
|
||||
file_path = data_file
|
||||
if not os.path.isabs(file_path):
|
||||
# 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):
|
||||
|
||||
Reference in New Issue
Block a user