fix directories in search results can not be opened by click

This commit is contained in:
Chris 2018-12-14 17:34:16 +08:00
parent dae992d4a9
commit bdac6106e4

View File

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