provide up-directory link in file listings

This commit is contained in:
David 2020-09-16 17:25:26 -04:00
parent 0a25e1a89c
commit cbde81e759
1 changed files with 1 additions and 0 deletions

View File

@ -109,6 +109,7 @@ func genIndex(folder, rel string) ([]byte, error) {
ret := bytes.NewBuffer([]byte{})
fmt.Fprintf(ret, "# %s\r\n\r\n", rel)
fmt.Fprintf(ret, "=> %s %s\r\n", filepath.Join(rel, ".."), "..")
for _, file := range files {
fmt.Fprintf(ret, "=> %s %s\r\n", filepath.Join(rel, file.Name()), file.Name())
}