mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-05-07 06:02:09 +08:00
fix(host): check file exist before copy ovmf vars (#24367)
This commit is contained in:
@@ -297,7 +297,7 @@ func (o baseOptions) BIOS(ovmfPath, ovmfVarsPath, homedir string) (string, error
|
||||
guestOvmfVarsPath := path.Join(homedir, ovmfVarsName)
|
||||
if !fileutils2.Exists(guestOvmfVarsPath) {
|
||||
sourceOvmfVarsPath := ovmfPath
|
||||
if ovmfVarsPath != "" {
|
||||
if ovmfVarsPath != "" && fileutils2.Exists(ovmfVarsPath) {
|
||||
sourceOvmfVarsPath = ovmfVarsPath
|
||||
}
|
||||
err := procutils.NewRemoteCommandAsFarAsPossible("cp", "-f", sourceOvmfVarsPath, guestOvmfVarsPath).Run()
|
||||
|
||||
Reference in New Issue
Block a user