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