Update var name

pull/144/head
Henrique Dias 2017-06-27 09:36:12 +01:00
parent 3c821a5413
commit 2df4efc369
No known key found for this signature in database
GPG Key ID: 936F5EB68D786730
1 changed files with 2 additions and 2 deletions

View File

@ -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