From a6af746a9493f210f05eff75ad6da484d8e13aa0 Mon Sep 17 00:00:00 2001 From: Qi Wang Date: Wed, 20 Mar 2019 10:06:27 -0400 Subject: fix Bug 1688041-podman image save removes existing image Signed-off-by: Qi Wang --- libpod/image/image.go | 3 --- 1 file changed, 3 deletions(-) (limited to 'libpod/image/image.go') diff --git a/libpod/image/image.go b/libpod/image/image.go index c5939e055..f79bc3dc2 100644 --- a/libpod/image/image.go +++ b/libpod/image/image.go @@ -1152,9 +1152,6 @@ func (i *Image) Save(ctx context.Context, source, format, output string, moreTag } } if err := i.PushImageToReference(ctx, destRef, manifestType, "", "", writer, compress, SigningOptions{}, &DockerRegistryOptions{}, additionaltags); err != nil { - if err2 := os.Remove(output); err2 != nil { - logrus.Errorf("error deleting %q: %v", output, err) - } return errors.Wrapf(err, "unable to save %q", source) } defer i.newImageEvent(events.Save) -- cgit v1.2.3-54-g00ecf