Merge pull request #41 from needsaholiday/bug/pluscharacter

fix unescape
This commit is contained in:
David Holdeman 2021-02-03 15:23:56 -06:00 committed by GitHub
commit 8244b5a5f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,7 +138,7 @@ func (c *Client) ReadDir(path string) ([]os.FileInfo, error) {
if p := getProps(r, "200"); p != nil { if p := getProps(r, "200"); p != nil {
f := new(File) f := new(File)
if ps, err := url.QueryUnescape(r.Href); err == nil { if ps, err := url.PathUnescape(r.Href); err == nil {
f.name = pathpkg.Base(ps) f.name = pathpkg.Base(ps)
} else { } else {
f.name = p.Name f.name = p.Name