From e5703490340a93c016b35f6af7ca0aa04ffbc2fe Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 16 Aug 2022 16:02:55 -0700 Subject: [PATCH] Edit .env and ignore canceled renames --- supervisor/shared/web_workflow/static/directory.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/supervisor/shared/web_workflow/static/directory.js b/supervisor/shared/web_workflow/static/directory.js index ebbd077af8..46acd82829 100644 --- a/supervisor/shared/web_workflow/static/directory.js +++ b/supervisor/shared/web_workflow/static/directory.js @@ -92,6 +92,7 @@ async function refresh_list() { if (f.directory) { icon = "📁"; } else if(f.name.endsWith(".txt") || + f.name.endsWith(".env") || f.name.endsWith(".py") || f.name.endsWith(".js") || f.name.endsWith(".json")) { @@ -211,6 +212,9 @@ async function del(e) { async function rename(e) { let fn = new URL(e.target.value); var new_fn = prompt("Rename to ", fn.pathname.substr(3)); + if (new_fn === null) { + return; + } let new_uri = new URL("/fs" + new_fn, fn); const response = await fetch(e.target.value, {