From 73010ff5939853e3d9993d7de0df93873c6381a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Mur=C3=A9?= Date: Thu, 8 Jun 2017 16:20:14 +0900 Subject: [PATCH] Filestore: more verbose error when adding a file from outside of the root MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit License: MIT Signed-off-by: Michael Muré --- filestore/fsrefstore.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filestore/fsrefstore.go b/filestore/fsrefstore.go index f1db5b6a8..46b385067 100644 --- a/filestore/fsrefstore.go +++ b/filestore/fsrefstore.go @@ -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)