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