Skip to content

Commit

Permalink
Return CODE_NOT_FOUND when listing the non-existent shared folder
Browse files Browse the repository at this point in the history
As defined in the protocol.
  • Loading branch information
aduffeck committed Mar 11, 2021
1 parent 11ecdc7 commit defc5de
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/storage/fs/owncloud/owncloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -1814,6 +1814,9 @@ func (fs *ocfs) listShareFolderRoot(ctx context.Context, sp string, mdKeys []str

mds, err := ioutil.ReadDir(ip)
if err != nil {
if os.IsNotExist(err) {
return nil, errtypes.NotFound(fs.toStoragePath(ctx, filepath.Dir(ip)))
}
return nil, errors.Wrap(err, "ocfs: error listing shadow_files")
}

Expand Down

0 comments on commit defc5de

Please sign in to comment.