Fix: files with percent sign (%) cannot be deleted in OneDrive

pull/265/head
HFO4 5 years ago
parent 65cf0f57aa
commit 87fde687eb

@ -1 +1 @@
Subproject commit f297f331f93732c397537d201b118417487284f3
Subproject commit 4f146a643bebec30e13866bef92cb3327b587fb3

@ -347,10 +347,12 @@ func (client *Client) makeBatchDeleteRequestsBody(files []string) string {
}
for i, v := range files {
v = strings.TrimPrefix(v, "/")
filePath, _ := url.Parse("/me/drive/root:/")
filePath.Path = path.Join(filePath.Path, v)
req.Requests[i] = BatchRequest{
ID: v,
Method: "DELETE",
URL: "me/drive/root:/" + v,
URL: filePath.EscapedPath(),
}
}

Loading…
Cancel
Save