fix: use "x-directory" instead of "os" for dir file type

This commit is contained in:
2022-02-05 16:08:56 +01:00
parent cd6fb4b88a
commit 0b4ca2464d

View File

@ -635,14 +635,14 @@ func mkDiv(c *cli.Context, mtype string, href, fname string, unknown bool) (stri
filename := fmt.Sprintf("<span class='filename'>%s</span>", fname)
ftype, _ := parseMtype(mtype)
ftype, stype := parseMtype(mtype)
if ftype == "text" {
divTag := "<div id=\"%s\" class='%s'>%s%s</div>"
div = fmt.Sprintf(divTag, fname, ftype, href, filename)
} else if ftype == "os" {
divTag := "<div id=\"%s\" class='%s'>%s</div>"
div = fmt.Sprintf(divTag, fname, ftype, href)
divTag := "<div id=\"%s\" class='x-%s'>%s</div>"
div = fmt.Sprintf(divTag, fname, stype, href)
} else {
if unknown {
// we really don't know what this is, so the filename is the href and we