From cc847a3d6d631767d69ba71b9b5d190ef33a4891 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 30 Mar 2018 22:34:17 +0200 Subject: [PATCH] tree: Improve error for pre-existing node --- internal/restic/tree.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/restic/tree.go b/internal/restic/tree.go index c2cb3b27b..317119096 100644 --- a/internal/restic/tree.go +++ b/internal/restic/tree.go @@ -48,7 +48,7 @@ func (t Tree) Equals(other *Tree) bool { func (t *Tree) Insert(node *Node) error { pos, _, err := t.binarySearch(node.Name) if err == nil { - return errors.New("node already present") + return errors.Errorf("node %q already present", node.Name) } // https://code.google.com/p/go-wiki/wiki/SliceTricks