Skip to content

Commit

Permalink
fix error type in ReadNode when file was not found
Browse files Browse the repository at this point in the history
The method ReadNode in the ocis storage didn't return the error type NotFound when a file was not found.

Signed-off-by: David Christofas <dchristofas@owncloud.com>
  • Loading branch information
David Christofas committed Nov 3, 2020
1 parent 32a59a5 commit 2c8bdca
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions changelog/unreleased/readnode-error-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Fix error type in read node when file was not found

The method ReadNode in the ocis storage didn't return the error type NotFound when a file was not found.

https://github.com/cs3org/reva/pull/323

2 changes: 1 addition & 1 deletion changelog/unreleased/update-grants-on-share-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ Bugfix: update share grants on share update

When a share was updated the share information in the share manager was updated but the grants set by the storage provider were not.

https://github.com/cs3org/reva/pull/1258
https://github.com/cs3org/reva/pull/1294
2 changes: 1 addition & 1 deletion pkg/storage/fs/ocis/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func ReadNode(ctx context.Context, lu *Lookup, id string) (n *Node, err error) {
} else {
log.Error().Err(err).Interface("node", n).Str("root.ID", root.ID).Msg("ReadNode()")
if isNotFound(err) {
return
return nil, errtypes.NotFound(err.Error())
}
return
}
Expand Down

0 comments on commit 2c8bdca

Please sign in to comment.