Don't restore image if layer does not exist

Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
John Howard 2018-02-13 11:39:58 -08:00
parent bbd9b7ffdf
commit 6903ca89af
1 changed files with 4 additions and 0 deletions

View File

@ -79,6 +79,10 @@ func (is *store) restore() error {
}
l, err = is.lss[img.OperatingSystem()].Get(chainID)
if err != nil {
if err == layer.ErrLayerDoesNotExist {
logrus.Errorf("layer does not exist, not restoring image %v, %v, %s", dgst, chainID, img.OperatingSystem())
return nil
}
return err
}
}