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

Former-commit-id: ed2a9a08fc9488bf4ad9ad6124d24324dce7bc4c [formerly 8cfcadb62184144e58bba8af3b6c47ace2f6050f] [formerly 040d07180c51944c5f5d713a86db915365c829fa [formerly ea3576da7e]]
Former-commit-id: e653086b78975f878ba0f6f397715c61f8fb53ef [formerly 1b4d65cd703b6c37fe6589da29c25d565783fe27]
Former-commit-id: 1f073a343adb693ee4d9153309a664520027908e
pull/726/head
helloray 2018-12-31 01:47:45 +08:00 committed by Henrique Dias
parent efa3b3f198
commit 694c750561
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(),