Skip to content

Commit

Permalink
changelog, not found fixes
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 Oct 3, 2020
1 parent 71b66dc commit 987330b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/check-permissions-in-ocis-driver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancement: check permissions in ocis driver

We are now checking grant permissions in the ocis storage driver.

https://github.com/cs3org/reva/pull/1213
4 changes: 2 additions & 2 deletions pkg/storage/fs/ocis/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func ReadNode(ctx context.Context, lu *Lookup, id string) (n *Node, err error) {
case isNoData(err):
return nil, errtypes.InternalError(err.Error())
case isNotFound(err):
return nil, errtypes.NotFound(n.ID)
return n, nil // swallow not found, the node defaults to exists = false
default:
return nil, errtypes.InternalError(err.Error())
}
Expand All @@ -182,7 +182,7 @@ func ReadNode(ctx context.Context, lu *Lookup, id string) (n *Node, err error) {
log.Debug().Interface("node", n).Str("root.ID", root.ID).Str("parentID", parentID).Msg("ReadNode() found parent")
} else {
log.Error().Err(err).Interface("node", n).Str("root.ID", root.ID).Msg("ReadNode()")
if os.IsNotExist(err) {
if isNotFound(err) {
return
}
return
Expand Down

0 comments on commit 987330b

Please sign in to comment.