This directory listing isn't very good, is it...
Signed-off-by: arzumify <jliwin98@danwin1210.de>
This commit is contained in:
parent
7b1188545d
commit
b0fb00d7fd
2
main.go
2
main.go
|
@ -288,7 +288,7 @@ func listDirectory(w http.ResponseWriter, r *http.Request, root string) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for _, entry := range entries {
|
for _, entry := range entries {
|
||||||
_, err = w.Write([]byte("<li><a href=\"" + entry.Name() + "\">" + entry.Name() + "</a></li>"))
|
_, err = w.Write([]byte("<li><a href=\"./" + entry.Name() + "\">" + entry.Name() + "</a></li>"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
serverError(w, 500)
|
serverError(w, 500)
|
||||||
slog.Error("Error writing directory listing: " + err.Error())
|
slog.Error("Error writing directory listing: " + err.Error())
|
||||||
|
|
Loading…
Reference in New Issue