From 694c750561b17cfa913b07a1aef7fd9f68502e3f Mon Sep 17 00:00:00 2001 From: helloray Date: Mon, 31 Dec 2018 01:47:45 +0800 Subject: [PATCH] fix directories in search results can not be opened by click (#583) Former-commit-id: ed2a9a08fc9488bf4ad9ad6124d24324dce7bc4c [formerly 8cfcadb62184144e58bba8af3b6c47ace2f6050f] [formerly 040d07180c51944c5f5d713a86db915365c829fa [formerly ea3576da7e88d00b1b076043e15fc9fa54d5ed31]] Former-commit-id: e653086b78975f878ba0f6f397715c61f8fb53ef [formerly 1b4d65cd703b6c37fe6589da29c25d565783fe27] Former-commit-id: 1f073a343adb693ee4d9153309a664520027908e --- lib/http/websockets.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/http/websockets.go b/lib/http/websockets.go index c2b822af..19c8aeb5 100644 --- a/lib/http/websockets.go +++ b/lib/http/websockets.go @@ -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(),