mirror of
https://github.com/9001/copyparty.git
synced 2025-08-18 09:22:31 -06:00
url-param ?v disables index.html
This commit is contained in:
parent
1fe0d4693e
commit
8a09601be8
|
@ -3570,7 +3570,11 @@ class HttpCli(object):
|
||||||
files.append(item)
|
files.append(item)
|
||||||
item["rd"] = rem
|
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"])
|
idx_html = set(["index.htm", "index.html"])
|
||||||
for item in files:
|
for item in files:
|
||||||
if item["name"] in idx_html:
|
if item["name"] in idx_html:
|
||||||
|
|
|
@ -1281,6 +1281,7 @@ function set_files_html(html) {
|
||||||
|
|
||||||
|
|
||||||
var ACtx = window.AudioContext || window.webkitAudioContext,
|
var ACtx = window.AudioContext || window.webkitAudioContext,
|
||||||
|
noih = /[?&]v\b/.exec('' + location),
|
||||||
hash0 = location.hash,
|
hash0 = location.hash,
|
||||||
mp;
|
mp;
|
||||||
|
|
||||||
|
@ -5503,7 +5504,7 @@ var treectl = (function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
r.chk_index_html = function (top, res) {
|
r.chk_index_html = function (top, res) {
|
||||||
if (!r.idxh || !res || !res.files)
|
if (!r.idxh || !res || !res.files || noih)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (var a = 0; a < res.files.length; a++)
|
for (var a = 0; a < res.files.length; a++)
|
||||||
|
|
Loading…
Reference in a new issue