fix directories in search results can not be opened by click (#583)

pull/582/head
helloray 2018-12-31 01:47:45 +08:00 committed by Henrique Dias
parent c01ebf33ef
commit ea3576da7e
1 changed files with 3 additions and 0 deletions

View File

@ -329,6 +329,9 @@ func search(c *fb.Context, w http.ResponseWriter, r *http.Request) (int, error)
return nil
}
}
if f.IsDir() {
originalPath = originalPath + "/"
}
response, _ := json.Marshal(map[string]interface{}{
"dir": f.IsDir(),