for tree.getroot, if deleted, break fast
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user