Browse Source

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

decentral1se 3 years ago
parent
commit
0b4ca2464d
No known key found for this signature in database GPG Key ID: 3789458B3D0C410
  1. 6
      distribusi.go

6
distribusi.go

@ -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) filename := fmt.Sprintf("<span class='filename'>%s</span>", fname)
ftype, _ := parseMtype(mtype) ftype, stype := parseMtype(mtype)
if ftype == "text" { if ftype == "text" {
divTag := "<div id=\"%s\" class='%s'>%s%s</div>" divTag := "<div id=\"%s\" class='%s'>%s%s</div>"
div = fmt.Sprintf(divTag, fname, ftype, href, filename) div = fmt.Sprintf(divTag, fname, ftype, href, filename)
} else if ftype == "os" { } else if ftype == "os" {
divTag := "<div id=\"%s\" class='%s'>%s</div>" divTag := "<div id=\"%s\" class='x-%s'>%s</div>"
div = fmt.Sprintf(divTag, fname, ftype, href) div = fmt.Sprintf(divTag, fname, stype, href)
} else { } else {
if unknown { if unknown {
// we really don't know what this is, so the filename is the href and we // we really don't know what this is, so the filename is the href and we

Loading…
Cancel
Save