mirror of
https://github.com/containers/podman.git
synced 2025-06-20 00:51:16 +08:00
machine: ocipull do not error if downloaddir exists
If users cancel the image download with CTRL-C for example then the blob dir will stay around. The next time we run the download we should just start the download again and not complain about the existing directory. [NO NEW TESTS NEEDED] Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -28,10 +28,6 @@ type PullOptions struct {
|
||||
|
||||
// Pull `imageInput` from a container registry to `sourcePath`.
|
||||
func Pull(ctx context.Context, imageInput types.ImageReference, localDestPath *define.VMFile, options *PullOptions) error {
|
||||
if _, err := os.Stat(localDestPath.GetPath()); err == nil {
|
||||
return fmt.Errorf("%q already exists", localDestPath.GetPath())
|
||||
}
|
||||
|
||||
destRef, err := layout.ParseReference(localDestPath.GetPath())
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user