From 3ee45c69a7ee441c9c75737687e9393358e7cd1e Mon Sep 17 00:00:00 2001 From: Noah Hsu Date: Tue, 13 Dec 2022 17:57:41 +0800 Subject: [PATCH] fix(baidu_netdisk): encode path for create (close #2690) --- drivers/baidu_netdisk/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/baidu_netdisk/util.go b/drivers/baidu_netdisk/util.go index f06b970c..5eab582f 100644 --- a/drivers/baidu_netdisk/util.go +++ b/drivers/baidu_netdisk/util.go @@ -187,7 +187,7 @@ func (d *BaiduNetdisk) create(path string, size int64, isdir int, uploadid, bloc params := map[string]string{ "method": "create", } - data := fmt.Sprintf("path=%s&size=%d&isdir=%d", path, size, isdir) + data := fmt.Sprintf("path=%s&size=%d&isdir=%d", encodeURIComponent(path), size, isdir) if uploadid != "" { data += fmt.Sprintf("&uploadid=%s&block_list=%s", uploadid, block_list) }