mirror of
https://github.com/containers/podman.git
synced 2025-05-17 15:18:43 +08:00
Check for imageID, not imageName
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>
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user