Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #48 from ipfs/fix-staticcheck
Browse files Browse the repository at this point in the history
fix staticcheck
  • Loading branch information
Stebalien authored May 16, 2021
2 parents 1408424 + c2dbc14 commit 39ed754
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions fsrefstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ func (f *FileManager) getDataObj(m mh.Multihash) (*pb.DataObj, error) {
switch err {
case ds.ErrNotFound:
return nil, blockstore.ErrNotFound
default:
return nil, err
case nil:
//
default:
return nil, err
}

return unmarshalDataObj(o)
Expand Down Expand Up @@ -290,7 +290,8 @@ func (f *FileManager) putTo(b *posinfo.FilestoreNode, to putter) error {
if !f.AllowFiles {
return ErrFilestoreNotEnabled
}
if !filepath.HasPrefix(b.PosInfo.FullPath, f.root) { //nolint:staticcheck
//lint:ignore SA1019 // ignore staticcheck
if !filepath.HasPrefix(b.PosInfo.FullPath, f.root) {
return fmt.Errorf("cannot add filestore references outside ipfs root (%s)", f.root)
}

Expand Down

0 comments on commit 39ed754

Please sign in to comment.