Update step_copy_disk.go (#10333)

This commit is contained in:
Ambrose Chua 2020-12-03 22:30:11 +08:00 committed by GitHub
parent 4254fa3581
commit f5d5e28012
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ func (s *stepCopyDisk) Run(ctx context.Context, state multistep.StateBag) multis
// isoPath extention is:
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. " +
"Skipping qemu-img convert step")
err := driver.Copy(isoPath, path)