VirtualBox

Changeset 92105 in vbox for trunk/src


Ignore:
Timestamp:
Oct 27, 2021 1:44:20 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9996. Cleaning the machine folder in case vm creation fails

Location:
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp

    r92095 r92105  
    115115void UIWizardNewVM::wizardClean()
    116116{
     117    /* Try to delete the hard disk in case we have created one: */
     118    deleteVirtualDisk();
     119    /* Cleanup the machine folder: */
    117120    UIWizardNewVMNameOSTypeCommon::cleanupMachineFolder(this, true);
    118121}
     
    135138        {
    136139            msgCenter().cannotCreateMachine(vbox, this);
    137             /* Try to delete the hard disk: */
    138             deleteVirtualDisk();
     140            wizardClean();
    139141            return false;
    140142        }
     
    166168    if (!vbox.isOk())
    167169    {
    168         /* Try to delete the hard disk: */
    169         deleteVirtualDisk();
    170170        msgCenter().cannotRegisterMachine(vbox, m_machine.GetName(), this);
     171        wizardClean();
    171172        return false;
    172173    }
     
    466467void UIWizardNewVM::sltHandleWizardCancel()
    467468{
    468     UIWizardNewVMNameOSTypeCommon::cleanupMachineFolder(this, true);
     469    wizardClean();
    469470}
    470471
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMExpertPage.cpp

    r92032 r92105  
    612612    UIWizardNewVM *pWizard = wizardWindow<UIWizardNewVM>();
    613613    AssertReturn(pWizard, false);
    614     bool fResult = true;
     614    bool fResult = UIWizardNewVMNameOSTypeCommon::createMachineFolder(m_pNameAndSystemEditor, this, wizardWindow<UIWizardNewVM>());
     615    if (!fResult)
     616        return false;
    615617
    616618    if (pWizard->diskSource() == SelectedDiskSource_New)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette