fix file info URL and webdav move destination URL

Former-commit-id: ee1536160e0d5a68afc3a8c0e9dc25bd170c7bd9
This commit is contained in:
Henrique Dias
2017-01-21 21:10:01 +00:00
parent 0ad540249e
commit 70aa887061
4 changed files with 9 additions and 5 deletions

View File

@@ -36,7 +36,7 @@ type Info struct {
func GetInfo(url *url.URL, c *config.Config, u *config.User) (*Info, int, error) {
var err error
i := &Info{URL: url.Path}
i := &Info{URL: c.PrefixURL + url.Path}
i.VirtualPath = strings.Replace(url.Path, c.BaseURL, "", 1)
i.VirtualPath = strings.TrimPrefix(i.VirtualPath, "/")
i.VirtualPath = "/" + i.VirtualPath