Strip path from initial request and consistency changes

This commit is contained in:
Henrique Dias committed 2017-06-27 10:45:06 +01:00
1 parent 6bce6fb584
commit 5f98fd89a8
7 files changed
+50 -51

No files matched your search

+1 -2
View File
@@ -71,8 +71,7 @@ func search(ctx *requestContext, w http.ResponseWriter, r *http.Request) (int, e
}
search = parseSearch(value)
scope := strings.Replace(r.URL.Path, ctx.FileManager.BaseURL, "", 1)
scope = strings.TrimPrefix(scope, "/")
scope := strings.TrimPrefix(r.URL.Path, "/")
scope = "/" + scope
scope = ctx.User.scope + scope
scope = strings.Replace(scope, "\\", "/", -1)