Skip to content

Commit

Permalink
quote etags in OCIS-Storage (#1232)
Browse files Browse the repository at this point in the history
  • Loading branch information
individual-it authored Oct 8, 2020
1 parent bccddc4 commit 6b143c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions changelog/unreleased/fix-quote-etag-on-ocis-storage.md
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions pkg/storage/fs/ocis/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6b143c2

Please sign in to comment.