mirror of
https://github.com/valyala/fasthttp.git
synced 2026-06-17 16:26:47 +03:00
Added a link to parent directory in fshandler
This commit is contained in:
@@ -197,6 +197,10 @@ func createDirIndex(base *URI, filePath string) (*fsFile, error) {
|
||||
fmt.Fprintf(w, "<h1>%s</h1>", basePathEscaped)
|
||||
fmt.Fprintf(w, "<ul>")
|
||||
|
||||
if len(basePathEscaped) > 0 {
|
||||
fmt.Fprintf(w, `<li><a href="..">..</a></li>`)
|
||||
}
|
||||
|
||||
f, err := os.Open(filePath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user