fix back on archive

This commit is contained in:
2026-01-16 16:46:46 -05:00
parent 746da2e21f
commit 81ab5b252b
2 changed files with 2 additions and 13 deletions

View File

@@ -71,18 +71,7 @@ func generateArchiveIndex(fsPath string, urlPath string) (string, error) {
b.WriteString("</title></head>\n<body>\n<h1>Index of ")
b.WriteString(template.HTMLEscapeString(urlPath))
b.WriteString("</h1><hr><pre>")
if urlPath != "/" {
b.WriteString(
`<a href="/archive` +
template.HTMLEscapeString(path.Dir(strings.TrimSuffix(urlPath, "/"))) +
`">../</a>` + "\n",
)
} else {
b.WriteString(
`<a href="/">../</a>` + "\n",
)
}
b.WriteString("<a href=\"../\">../</a>\n")
nameCol := 50
for _, ei := range list {