Fix file id field in the search response

This commit is contained in:
André Duffeck
2022-04-22 17:54:55 +02:00
parent b14bded1d3
commit 962840ec55

View File

@@ -96,7 +96,6 @@ func multistatusResponse(ctx context.Context, matches []*searchmsg.Match) ([]byt
}
func matchToPropResponse(ctx context.Context, match *searchmsg.Match) (*propfind.ResponseXML, error) {
response := propfind.ResponseXML{
Href: net.EncodePath(path.Join("/dav/spaces/", match.Entity.Ref.ResourceId.StorageId+"!"+match.Entity.Ref.ResourceId.OpaqueId, match.Entity.Ref.Path)),
Propstat: []propfind.PropstatXML{},
@@ -107,7 +106,7 @@ func matchToPropResponse(ctx context.Context, match *searchmsg.Match) (*propfind
Prop: []prop.PropertyXML{},
}
propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("oc:id", match.Entity.Id.StorageId+"!"+match.Entity.Id.OpaqueId))
propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("oc:fileid", match.Entity.Id.StorageId+"!"+match.Entity.Id.OpaqueId))
size := strconv.FormatUint(match.Entity.Size, 10)
propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("oc:size", size))