url-param ?v disables index.html

This commit is contained in:
ed 2023-03-16 20:52:43 +00:00
parent 1fe0d4693e
commit 8a09601be8
2 changed files with 7 additions and 2 deletions

View file

@ -3570,7 +3570,11 @@ class HttpCli(object):
files.append(item)
item["rd"] = rem
if self.cookies.get("idxh") == "y":
if (
self.cookies.get("idxh") == "y"
and "ls" not in self.uparam
and "v" not in self.uparam
):
idx_html = set(["index.htm", "index.html"])
for item in files:
if item["name"] in idx_html:

View file

@ -1281,6 +1281,7 @@ function set_files_html(html) {
var ACtx = window.AudioContext || window.webkitAudioContext,
noih = /[?&]v\b/.exec('' + location),
hash0 = location.hash,
mp;
@ -5503,7 +5504,7 @@ var treectl = (function () {
}
r.chk_index_html = function (top, res) {
if (!r.idxh || !res || !res.files)
if (!r.idxh || !res || !res.files || noih)
return;
for (var a = 0; a < res.files.length; a++)