From 3942e3b2efefe674dbb5562022c8a34494cd92d9 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 9 May 2021 01:42:19 -0700 Subject: [PATCH] a better fix --- weed/util/bounded_tree/bounded_tree.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weed/util/bounded_tree/bounded_tree.go b/weed/util/bounded_tree/bounded_tree.go index ba7f1dcc4..58911df75 100644 --- a/weed/util/bounded_tree/bounded_tree.go +++ b/weed/util/bounded_tree/bounded_tree.go @@ -41,9 +41,9 @@ func (t *BoundedTree) EnsureVisited(p util.FullPath, visitFn VisitNodeFunc) (vis if t.root == nil { return } - components := util.FullPath(p[len(t.baseDir):]).Split() + components := p.Split() // fmt.Printf("components %v %d\n", components, len(components)) - canDelete, err := t.ensureVisited(t.root, t.baseDir, components, 0, visitFn) + canDelete, err := t.ensureVisited(t.root, util.FullPath("/"), components, 0, visitFn) if err != nil { return err }