From 72fcd008594256a4f8a17afef0fe2c5e37f2ced6 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 11 Oct 2015 18:46:26 +0200 Subject: [PATCH] Check subtrees with null ID --- checker/checker.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/checker/checker.go b/checker/checker.go index 438577ffb..73d59b408 100644 --- a/checker/checker.go +++ b/checker/checker.go @@ -522,6 +522,11 @@ func (c *Checker) checkTree(id backend.ID, tree *restic.Tree) (errs []error) { errs = append(errs, Error{TreeID: &id, Err: fmt.Errorf("node %d is dir but has no subtree", i)}) continue } + + if node.Subtree.IsNull() { + errs = append(errs, Error{TreeID: &id, Err: fmt.Errorf("node %d is dir subtree id is null", i)}) + continue + } } }