diff --git a/changelog/unreleased/fix-quote-etag-on-ocis-storage.md b/changelog/unreleased/fix-quote-etag-on-ocis-storage.md new file mode 100644 index 0000000000..319948ad69 --- /dev/null +++ b/changelog/unreleased/fix-quote-etag-on-ocis-storage.md @@ -0,0 +1,6 @@ +Bugfix: Fix missing quotes on OCIS-Storage + +Etags have to be enclosed in quotes ". Return correct etags on OCIS-Storage. + +https://github.com/owncloud/product/issues/237 +https://github.com/cs3org/reva/pull/1232 diff --git a/pkg/storage/fs/ocis/node.go b/pkg/storage/fs/ocis/node.go index fd9e2e8099..69043dfb1b 100644 --- a/pkg/storage/fs/ocis/node.go +++ b/pkg/storage/fs/ocis/node.go @@ -355,9 +355,9 @@ func (n *Node) AsResourceInfo(ctx context.Context) (ri *provider.ResourceInfo, e // use temporary etag if it is set if b, err := xattr.Get(nodePath, tmpEtagAttr); err == nil { - ri.Etag = string(b) + ri.Etag = fmt.Sprintf(`"%x"`, string(b)) } else { - ri.Etag = fmt.Sprintf("%x", h.Sum(nil)) + ri.Etag = fmt.Sprintf(`"%x"`, h.Sum(nil)) } // mtime uses tmtime if present