From ea3576da7e88d00b1b076043e15fc9fa54d5ed31 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) --- 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(),