From 9d99f4cb5928f16c9bdad3ad39092d0df2d3c5f8 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Thu, 9 Nov 2023 18:04:11 +0100 Subject: [PATCH] Visual Selector - Fixing malformed elements.json grabber --- changedetectionio/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/changedetectionio/__init__.py b/changedetectionio/__init__.py index 54c02804..3a2197bf 100644 --- a/changedetectionio/__init__.py +++ b/changedetectionio/__init__.py @@ -1208,8 +1208,7 @@ def changedetection_app(config=None, datastore_o=None): # These files should be in our subdirectory try: # set nocache, set content-type - watch_dir = datastore_o.datastore_path + "/" + filename - response = make_response(send_from_directory(filename="elements.json", directory=watch_dir, path=watch_dir + "/elements.json")) + response = make_response(send_from_directory(os.path.join(datastore_o.datastore_path, filename), "elements.json")) response.headers['Content-type'] = 'application/json' response.headers['Cache-Control'] = 'no-cache, no-store, must-revalidate' response.headers['Pragma'] = 'no-cache'