diff --git a/cache/image_cache.go b/cache/image_cache.go index e82633d58..09a81bbda 100644 --- a/cache/image_cache.go +++ b/cache/image_cache.go @@ -77,7 +77,7 @@ func (c *ImageCache) SetMetadata(metadata platform.CacheMetadata) error { } func (c *ImageCache) RetrieveMetadata() (platform.CacheMetadata, error) { - if !c.origImage.Valid() { + if c.origImage.Found() && !c.origImage.Valid() { c.logger.Infof("Ignoring cache image %q because it was corrupt", c.origImage.Name()) return platform.CacheMetadata{}, nil }