fix: graph api sharing parentReference path (#8307)

* fix: graph api sharing parentReference path

* Update services/graph/pkg/service/v0/driveitems.go

Co-authored-by: Jörn Friedrich Dreyer <jfd@butonic.de>

---------

Co-authored-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Florian Schade
2024-01-30 12:01:54 +01:00
committed by GitHub
parent b71cdd7004
commit ac878e1399

View File

@@ -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() != "" {