From da8451b7cc4317d9e7a8ad8e687fda58e107ccbf Mon Sep 17 00:00:00 2001 From: foamyguy Date: Mon, 1 Aug 2022 21:56:11 -0500 Subject: [PATCH] fix edit URL for files inside of directories --- supervisor/shared/web_workflow/static/directory.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/supervisor/shared/web_workflow/static/directory.js b/supervisor/shared/web_workflow/static/directory.js index 9dbe8384d6..91389343d6 100644 --- a/supervisor/shared/web_workflow/static/directory.js +++ b/supervisor/shared/web_workflow/static/directory.js @@ -63,6 +63,7 @@ async function refresh_list() { var icon = "⬇"; var file_path = current_path + f.name; let api_url = new URL("/fs" + file_path, url_base); + let edit_url = "/edit/#" + file_path; if (f.directory) { file_path = "#" + file_path + "/"; api_url += "/"; @@ -91,7 +92,7 @@ async function refresh_list() { delete_button.disabled = !editable; delete_button.onclick = del; - let edit_url = new URL("/edit/#" + f.name, url_base); + edit_url = new URL(edit_url, url_base); let edit_link = clone.querySelector(".edit_link"); edit_link.href = edit_url