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 410d3cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libpod/storage.go
Expand Up @@ -70,7 +70,7 @@ func (metadata *RuntimeContainerMetadata) SetMountLabel(mountLabel string) {
// 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 410d3cd

Please sign in to comment.