Skip to content

Commit 0d10588

Browse files
committed
🐛 修复onedrive空间问题 #224
1 parent dc56ec6 commit 0d10588

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pkg/filesystem/onedrive/onedrive.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export default class OneDriveFileSystem implements FileSystem {
6666
parent = `:${parent}:`;
6767
}
6868
return this.request(
69-
`https://graph.microsoft.com/v1.0/drive/special/approot${parent}/children`,
69+
`https://graph.microsoft.com/v1.0/me/drive/special/approot${parent}/children`,
7070
{
7171
method: "POST",
7272
headers: myHeaders,
@@ -119,7 +119,7 @@ export default class OneDriveFileSystem implements FileSystem {
119119

120120
delete(path: string): Promise<void> {
121121
return this.request(
122-
`https://graph.microsoft.com/v1.0/drive/special/approot:${joinPath(
122+
`https://graph.microsoft.com/v1.0/me/drive/special/approot:${joinPath(
123123
this.path,
124124
path
125125
)}`,
@@ -143,7 +143,7 @@ export default class OneDriveFileSystem implements FileSystem {
143143
path = `:${path}:`;
144144
}
145145
return this.request(
146-
`https://graph.microsoft.com/v1.0/drive/special/approot${path}/children`
146+
`https://graph.microsoft.com/v1.0/me/drive/special/approot${path}/children`
147147
).then((data) => {
148148
const list: File[] = [];
149149
data.value.forEach((val: any) => {

pkg/filesystem/onedrive/rw.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export class OneDriveFileReader implements FileReader {
1818

1919
async read(type?: "string" | "blob"): Promise<string | Blob> {
2020
const data = await this.fs.request(
21-
`https://graph.microsoft.com/v1.0/drive/special/approot:${joinPath(
21+
`https://graph.microsoft.com/v1.0/me/drive/special/approot:${joinPath(
2222
this.file.path,
2323
this.file.name
2424
)}:/content`,
@@ -69,7 +69,7 @@ export class OneDriveFileWriter implements FileWriter {
6969
myHeaders.append("Content-Type", "application/json");
7070
const uploadUrl = await this.fs
7171
.request(
72-
`https://graph.microsoft.com/v1.0/drive/special/approot:${this.path}:/createUploadSession`,
72+
`https://graph.microsoft.com/v1.0/me/drive/special/approot:${this.path}:/createUploadSession`,
7373
{
7474
method: "POST",
7575
headers: myHeaders,

0 commit comments

Comments
 (0)