for tree.getroot, if deleted, break fast

master
Bel LaPointe 2022-02-09 11:41:45 -07:00
parent 6a6d2ba822
commit 2a278a33e0
1 changed files with 3 additions and 0 deletions

View File

@ -100,6 +100,9 @@ func (tree Tree) getRoot(withContent bool) (Branch, error) {
if !withContent {
m.Leaf.Content = ""
}
if m.Leaf.Deleted {
return m, nil
}
} else if entry.IsDir() {
if branch, err := tree.WithRoot(path.Join(tree.root, entry.Name())).getRoot(withContent); err != nil {
return Branch{}, err