mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 17:41:57 +08:00
Fix: files with percent sign (%) cannot be deleted in OneDrive
This commit is contained in:
2
assets
2
assets
Submodule assets updated: f297f331f9...4f146a643b
@@ -347,10 +347,12 @@ func (client *Client) makeBatchDeleteRequestsBody(files []string) string {
|
|||||||
}
|
}
|
||||||
for i, v := range files {
|
for i, v := range files {
|
||||||
v = strings.TrimPrefix(v, "/")
|
v = strings.TrimPrefix(v, "/")
|
||||||
|
filePath, _ := url.Parse("/me/drive/root:/")
|
||||||
|
filePath.Path = path.Join(filePath.Path, v)
|
||||||
req.Requests[i] = BatchRequest{
|
req.Requests[i] = BatchRequest{
|
||||||
ID: v,
|
ID: v,
|
||||||
Method: "DELETE",
|
Method: "DELETE",
|
||||||
URL: "me/drive/root:/" + v,
|
URL: filePath.EscapedPath(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user