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 <[email protected]>
  • Loading branch information
butonic committed Dec 18, 2023
1 parent 7810e3d commit e4f37d8
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 e4f37d8

Please sign in to comment.