From 9d8928362db958dbb128a8fe7707c678e47aecb7 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Tue, 27 Jun 2017 09:36:12 +0100 Subject: [PATCH] Update var name Former-commit-id: 1d455e1df0045f8d3fa7b87245d08464eba20273 [formerly 385ca7846c8085ac4848330e7c2903653945df5e] [formerly 7cb84d0a3e3614c8de24a5a1a96811c2bee40f88 [formerly 2df4efc369d944261c4cc362a3f85887d1a1bd6d]] Former-commit-id: 16afb44d65ffd7885d104b340ca5c8c8997b8b36 [formerly b394abd63c8ab34539dc9e68dbd8f12b4795c7b6] Former-commit-id: a50ef3c36267359ce6b4e52d9c9f3642e616e376 --- search.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/search.go b/search.go index 5cf27699..9876c2b2 100644 --- a/search.go +++ b/search.go @@ -43,7 +43,7 @@ func parseSearch(value string) *searchOptions { } // search searches for a file or directory. -func search(w http.ResponseWriter, r *http.Request, c *FileManager, u *User) (int, error) { +func search(w http.ResponseWriter, r *http.Request, m *FileManager, u *User) (int, error) { // Upgrades the connection to a websocket and checks for errors. conn, err := upgrader.Upgrade(w, r, nil) if err != nil { @@ -71,7 +71,7 @@ func search(w http.ResponseWriter, r *http.Request, c *FileManager, u *User) (in } search = parseSearch(value) - scope := strings.Replace(r.URL.Path, c.BaseURL, "", 1) + scope := strings.Replace(r.URL.Path, m.BaseURL, "", 1) scope = strings.TrimPrefix(scope, "/") scope = "/" + scope scope = u.scope + scope