From 50a16b90567dacab0e724ba3620174a19d80489f Mon Sep 17 00:00:00 2001 From: Brian Buller Date: Mon, 12 Jun 2017 18:25:09 -0500 Subject: [PATCH] Fixed bug in get bucket list method --- boltease.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/boltease.go b/boltease.go index 925bc88..ee08170 100644 --- a/boltease.go +++ b/boltease.go @@ -232,16 +232,14 @@ func (b *DB) GetBucketList(path []string) ([]string, error) { if bkt == nil { return fmt.Errorf("Couldn't find bucket " + path[0]) } - var newBkt *bolt.Bucket var berr error if len(path) > 1 { for idx := 1; idx < len(path); idx++ { - newBkt = bkt.Bucket([]byte(path[idx])) - if newBkt == nil { - return fmt.Errorf("Couldn't find bucket " + strings.Join(path[:idx], "/")) + bkt = bkt.Bucket([]byte(path[idx])) + if bkt == nil { + return fmt.Errorf("Couldn't find bucket " + strings.Join(path[:idx], " / ")) } } - bkt = newBkt } // newBkt should have the last bucket in the path