Update step_copy_disk.go (#10333)
This commit is contained in:
parent
4254fa3581
commit
f5d5e28012
|
@ -33,7 +33,7 @@ func (s *stepCopyDisk) Run(ctx context.Context, state multistep.StateBag) multis
|
||||||
|
|
||||||
// isoPath extention is:
|
// isoPath extention is:
|
||||||
ext := filepath.Ext(isoPath)
|
ext := filepath.Ext(isoPath)
|
||||||
if ext[1:] == s.Format {
|
if len(ext) >= 1 && ext[1:] == s.Format {
|
||||||
ui.Message("File extension already matches desired output format. " +
|
ui.Message("File extension already matches desired output format. " +
|
||||||
"Skipping qemu-img convert step")
|
"Skipping qemu-img convert step")
|
||||||
err := driver.Copy(isoPath, path)
|
err := driver.Copy(isoPath, path)
|
||||||
|
|
Loading…
Reference in New Issue