Skip to content

Commit 6a60781

Browse files
committed
fix(filer): listDir error
1 parent ae15038 commit 6a60781

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

volumes/filer.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ import (
77
"io"
88
"mime/multipart"
99
"net/http"
10+
"net/url"
1011

1112
drycc "github.com/drycc/controller-sdk-go"
1213
"github.com/drycc/controller-sdk-go/api"
1314
)
1415

1516
// ListDir to an app's volume.
1617
func ListDir(c *drycc.Client, appID, volumeID, path string, results int) (api.FilerDirEntries, int, error) {
17-
u := fmt.Sprintf("/v2/apps/%s/volumes/%s/client/?path=%s", appID, volumeID, path)
18+
u := fmt.Sprintf("/v2/apps/%s/volumes/%s/client/?path=%s", appID, volumeID, url.QueryEscape(path))
1819

1920
body, count, reqErr := c.LimitedRequest(u, results)
2021

0 commit comments

Comments
 (0)