From ac878e13995fab1cc84284fcc0afd286e7dc494a Mon Sep 17 00:00:00 2001 From: Florian Schade Date: Tue, 30 Jan 2024 12:01:54 +0100 Subject: [PATCH] fix: graph api sharing parentReference path (#8307) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: graph api sharing parentReference path * Update services/graph/pkg/service/v0/driveitems.go Co-authored-by: Jörn Friedrich Dreyer --------- Co-authored-by: Jörn Friedrich Dreyer --- services/graph/pkg/service/v0/driveitems.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/graph/pkg/service/v0/driveitems.go b/services/graph/pkg/service/v0/driveitems.go index 2c2fa15212..cae2d90d5f 100644 --- a/services/graph/pkg/service/v0/driveitems.go +++ b/services/graph/pkg/service/v0/driveitems.go @@ -1010,8 +1010,8 @@ func cs3ResourceToDriveItem(logger *log.Logger, res *storageprovider.ResourceInf parentRef.SetDriveType(res.GetSpace().GetSpaceType()) parentRef.SetDriveId(storagespace.FormatStorageID(res.GetParentId().GetStorageId(), res.GetParentId().GetSpaceId())) parentRef.SetId(storagespace.FormatResourceID(*res.GetParentId())) - parentRef.SetName(res.GetName()) - parentRef.SetPath(res.GetPath()) + parentRef.SetName(path.Base(path.Dir(res.GetPath()))) + parentRef.SetPath(path.Dir(res.GetPath())) driveItem.ParentReference = parentRef } if res.GetType() == storageprovider.ResourceType_RESOURCE_TYPE_FILE && res.GetMimeType() != "" {