Update var name
Former-commit-id: 1d455e1df0045f8d3fa7b87245d08464eba20273 [formerly 385ca7846c8085ac4848330e7c2903653945df5e] [formerly 7cb84d0a3e3614c8de24a5a1a96811c2bee40f88 [formerly 2df4efc369
]]
Former-commit-id: 16afb44d65ffd7885d104b340ca5c8c8997b8b36 [formerly b394abd63c8ab34539dc9e68dbd8f12b4795c7b6]
Former-commit-id: a50ef3c36267359ce6b4e52d9c9f3642e616e376
pull/726/head
parent
6b963a9880
commit
9d8928362d
|
@ -43,7 +43,7 @@ func parseSearch(value string) *searchOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
// search searches for a file or directory.
|
// 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.
|
// Upgrades the connection to a websocket and checks for errors.
|
||||||
conn, err := upgrader.Upgrade(w, r, nil)
|
conn, err := upgrader.Upgrade(w, r, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -71,7 +71,7 @@ func search(w http.ResponseWriter, r *http.Request, c *FileManager, u *User) (in
|
||||||
}
|
}
|
||||||
|
|
||||||
search = parseSearch(value)
|
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 = strings.TrimPrefix(scope, "/")
|
||||||
scope = "/" + scope
|
scope = "/" + scope
|
||||||
scope = u.scope + scope
|
scope = u.scope + scope
|
||||||
|
|
Loading…
Reference in New Issue