From 2df4efc369d944261c4cc362a3f85887d1a1bd6d Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Tue, 27 Jun 2017 09:36:12 +0100 Subject: [PATCH] Update var name --- 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