Check for metadata.json

This commit is contained in:
sophia 2022-03-16 10:44:49 -05:00 committed by Paul Hinze
parent 0d38ccf20c
commit c23e617fce
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0

View File

@ -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