mirror of
https://github.com/restic/restic.git
synced 2024-12-25 09:18:55 +00:00
tree: Improve error for pre-existing node
This commit is contained in:
parent
baebf45e2e
commit
cc847a3d6d
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue