Skip to content

Commit

Permalink
oc:spaceid should be in the form of {providerid}${spaceid}
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
  • Loading branch information
butonic committed Dec 14, 2023
1 parent a846733 commit f0580b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/fix-ocdav-spaceid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: make ocdav return correct oc:spaceid

propfinds now return `oc:spaceid` in the form of `{providerid}${spaceid}`

https://github.com/cs3org/reva/pull/4407
4 changes: 2 additions & 2 deletions internal/http/services/owncloud/ocdav/propfind/propfind.go
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,7 @@ func mdToPropResponse(ctx context.Context, pf *XML, md *provider.ResourceInfo, p
appendToOK(
prop.Escaped("oc:id", sid),
prop.Escaped("oc:fileid", sid),
prop.Escaped("oc:spaceid", id.SpaceId),
prop.Escaped("oc:spaceid", storagespace.FormatStorageID(id.StorageId, id.SpaceId)),
)
}

Expand Down Expand Up @@ -1296,7 +1296,7 @@ func mdToPropResponse(ctx context.Context, pf *XML, md *provider.ResourceInfo, p
}
case "spaceid":
if id != nil {
appendToOK(prop.Escaped("oc:spaceid", id.SpaceId))
appendToOK(prop.Escaped("oc:spaceid", storagespace.FormatStorageID(id.StorageId, id.SpaceId)))
} else {
appendToNotFound(prop.Escaped("oc:spaceid", ""))
}
Expand Down

0 comments on commit f0580b6

Please sign in to comment.