admin/sync: escape cloud URL
This commit is contained in:
parent
11c8a56f14
commit
6329f44d42
|
@ -6,6 +6,7 @@ import (
|
|||
"net/http"
|
||||
"net/url"
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/studio-b12/gowebdav"
|
||||
)
|
||||
|
@ -84,7 +85,7 @@ func (i CloudImporter) getFile(filename string, writer *bufio.Writer) error {
|
|||
func (i CloudImporter) listDir(filename string) ([]string, error) {
|
||||
client := gowebdav.NewClient(i.baseDAV.String(), i.username, i.password)
|
||||
|
||||
if files, err := client.ReadDir(filename); err != nil {
|
||||
if files, err := client.ReadDir(strings.Replace(url.PathEscape(filename), "%2F", "/", -1)); err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
res := make([]string, 0)
|
||||
|
|
Loading…
Reference in New Issue
Block a user