Skip to content

Commit

Permalink
Check for imageID, not imageName
Browse files Browse the repository at this point in the history
We are only using imageID on that branch, so it is
more consistent.

Should not change behavior; in callers, either
both are set or neither.

[NO NEW TESTS NEEDED]

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
  • Loading branch information
mtrmac committed Nov 20, 2023
1 parent ff80e40 commit ae9b63f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libpod/storage.go
Expand Up @@ -66,11 +66,12 @@ func (metadata *RuntimeContainerMetadata) SetMountLabel(mountLabel string) {
metadata.MountLabel = mountLabel
}

// CreateContainerStorage creates the storage end of things. We already have the container spec created
// CreateContainerStorage creates the storage end of things. We already have the container spec created.
// imageID and imageName must both be either empty or non-empty.
// TO-DO We should be passing in an Image object in the future.
func (r *storageService) CreateContainerStorage(ctx context.Context, systemContext *types.SystemContext, imageName, imageID, containerName, containerID string, options storage.ContainerOptions) (_ ContainerInfo, retErr error) {
var imageConfig *v1.Image
if imageName != "" {
if imageID != "" {
if containerName == "" {
return ContainerInfo{}, define.ErrEmptyID
}
Expand Down

0 comments on commit ae9b63f

Please sign in to comment.