Filestore: more verbose error when adding a file from outside of the root
License: MIT Signed-off-by: Michael Muré <batolettre@gmail.com>
Michael Muré committed
Jun 8, 2017 at 16:20 UTC
73010ff5939853e3d9993d7de0df93873c6381a4
1 file changed
+1
-1
filestore/fsrefstore.go
+1
-1
@@ -211,7 +211,7 @@ func (f *FileManager) putTo(b *posinfo.FilestoreNode, to putter) error {
211
var dobj pb.DataObj
212
213
if !filepath.HasPrefix(b.PosInfo.FullPath, f.root) {
214
- return fmt.Errorf("cannot add filestore references outside ipfs root")
214
+ return fmt.Errorf("cannot add filestore references outside ipfs root (%s)", f.root)
215
}
216
217
p, err := filepath.Rel(f.root, b.PosInfo.FullPath)