Skip to content

Commit 2c8bdca

Browse files
author
David Christofas
committed
fix error type in ReadNode 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. Signed-off-by: David Christofas <[email protected]>
1 parent 32a59a5 commit 2c8bdca

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Bugfix: Fix error type in read node when file was not found
2+
3+
The method ReadNode in the ocis storage didn't return the error type NotFound when a file was not found.
4+
5+
https://github.com/cs3org/reva/pull/323
6+

changelog/unreleased/update-grants-on-share-update.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ Bugfix: update share grants on share update
22

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

5-
https://github.com/cs3org/reva/pull/1258
5+
https://github.com/cs3org/reva/pull/1294

pkg/storage/fs/ocis/node.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ func ReadNode(ctx context.Context, lu *Lookup, id string) (n *Node, err error) {
183183
} else {
184184
log.Error().Err(err).Interface("node", n).Str("root.ID", root.ID).Msg("ReadNode()")
185185
if isNotFound(err) {
186-
return
186+
return nil, errtypes.NotFound(err.Error())
187187
}
188188
return
189189
}

0 commit comments

Comments
 (0)