From c23e617fce26f397fdaa9a7bab5c04a6e7f2cfeb Mon Sep 17 00:00:00 2001 From: sophia Date: Wed, 16 Mar 2022 10:44:49 -0500 Subject: [PATCH] Check for metadata.json --- internal/core/box_collection.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/core/box_collection.go b/internal/core/box_collection.go index ec0ebecd5..ad8b24fd5 100644 --- a/internal/core/box_collection.go +++ b/internal/core/box_collection.go @@ -272,7 +272,7 @@ func (b *BoxCollection) listBoxDir() (boxPaths []string, err error) { } // Each box has a metadata.json file. If that file is found, then // the path belonds to a box. - if strings.HasSuffix(path, "metadata.json") { + if filepath.Base(path) == "metadata.json" { boxPaths = append(boxPaths, strings.ReplaceAll(path, "metadata.json", "")) } return nil