mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-06 08:47:52 +08:00
Merge pull request #3964 from MichaelMure/filestore_root
Filestore: more verbose error when adding a file from outside of the root
This commit is contained in:
commit
1a1935f975
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user