Skip to content

Commit

Permalink
Merge pull request #3964 from MichaelMure/filestore_root
Browse files Browse the repository at this point in the history
Filestore: more verbose error when adding a file from outside of the root
  • Loading branch information
whyrusleeping committed Jun 9, 2017
2 parents eef022c + 73010ff commit 1a1935f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion filestore/fsrefstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func (f *FileManager) putTo(b *posinfo.FilestoreNode, to putter) error {
var dobj pb.DataObj

if !filepath.HasPrefix(b.PosInfo.FullPath, f.root) {
return fmt.Errorf("cannot add filestore references outside ipfs root")
return fmt.Errorf("cannot add filestore references outside ipfs root (%s)", f.root)
}

p, err := filepath.Rel(f.root, b.PosInfo.FullPath)
Expand Down

0 comments on commit 1a1935f

Please sign in to comment.