- # looks like a saved Docker image. We only take up to two
- # files, because any number >1 means there's no match.
- coll_files = Keep::Manifest.new(coll_match.manifest_text).each_file.take(2)
- if (coll_files.size == 1) and
- (coll_files[0][1] =~ /^[0-9A-Fa-f]{64}\.tar$/)
+ # looks like a saved Docker image.
+ manifest = Keep::Manifest.new(coll_match.manifest_text)
+ if manifest.exact_file_count?(1) and
+ (manifest.files[0][1] =~ /^[0-9A-Fa-f]{64}\.tar$/)