From 5a4a351ea55582b977281bee913767956788cf45 Mon Sep 17 00:00:00 2001 From: Jcomp Date: Sun, 22 Oct 2023 06:01:53 +0000 Subject: [PATCH] Fix path-based addressing syntax --- src/onedrive.d | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/onedrive.d b/src/onedrive.d index 2826893e8..d098cc641 100644 --- a/src/onedrive.d +++ b/src/onedrive.d @@ -622,8 +622,9 @@ class OneDriveApi { JSONValue getPathDetailsByDriveId(string driveId, string path) { checkAccessTokenExpired(); string url; - // Required format: /drives/{drive-id}/root:/{item-path} - url = driveByIdUrl ~ driveId ~ "/root:/" ~ encodeComponent(path); + // https://learn.microsoft.com/en-us/onedrive/developer/rest-api/concepts/addressing-driveitems?view=odsp-graph-online + // Required format: /drives/{drive-id}/root:/{item-path}: + url = driveByIdUrl ~ driveId ~ "/root:/" ~ encodeComponent(path) ~ ":"; return get(url); }