diff --git a/ESP32_AP-Flasher/data/www/edit.html.gz b/ESP32_AP-Flasher/data/www/edit.html.gz index 7e4d2529..e1da684b 100644 Binary files a/ESP32_AP-Flasher/data/www/edit.html.gz and b/ESP32_AP-Flasher/data/www/edit.html.gz differ diff --git a/ESP32_AP-Flasher/wwwroot/edit.html b/ESP32_AP-Flasher/wwwroot/edit.html index ea76ad47..fa4ca6f0 100644 --- a/ESP32_AP-Flasher/wwwroot/edit.html +++ b/ESP32_AP-Flasher/wwwroot/edit.html @@ -1,4 +1,3 @@ - @@ -626,9 +625,9 @@ leaf.onclick = function (e) { treeRoot.removeChild(treeRoot.childNodes[0]); if (name == "..") { - httpGet(treeRoot, "/"); + httpGet(treeRoot, path === "/" ? "/" : path.substring(0, path.lastIndexOf('/')) || "/"); } else { - httpGet(treeRoot, "/" + name); + httpGet(treeRoot, path + (path != "/" ? "/" : "") + name); } }; leaf.oncontextmenu = function (e) { @@ -654,9 +653,6 @@ sortByKey(items, 'name'); var list = ce("ul"); parent.appendChild(list); - if (path != "/") { - list.appendChild(createDirLeaf("/", "..", 0)); - } var ll = items.length; for (var i = 0; i < ll; i++) { if (items[i].type === "file") { @@ -666,7 +662,9 @@ list.insertBefore(createDirLeaf(path, items[i].name, items[i].size), list.firstChild); } } - + if (path != "/") { + list.insertBefore(createDirLeaf(path, "..", 0), list.firstChild); + } } function isTextFile(path) { @@ -863,7 +861,7 @@ editor.loadUrl(vars.file); }; -