VirtualBox

Changeset 72202 in vbox for trunk/src


Ignore:
Timestamp:
May 14, 2018 2:43:37 PM (7 years ago)
Author:
vboxsync
Message:

FE/Qt bugref:6769 Try to be a bit more clever about creating and removing vm folders.

File:
1 edited

Legend:

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

    r72199 r72202  
    252252    composeMachineFilePath();
    253253
    254     /* Make sure that folder doesn't exists: */
     254
     255    /* Check if the folder already exists and check if it has been created by this wizard */
    255256    if (QDir(m_strMachineFolder).exists())
    256257    {
    257         msgCenter().cannotRewriteMachineFolder(m_strMachineFolder, thisImp());
    258         return false;
     258        /* Looks like we have already created this folder for this run of the wizard. Just return */
     259        if (m_strCreatedFolder == m_strMachineFolder)
     260            return true;
     261        /* The folder is there but not because of this wizard. Avoid overwriting a existing machine's folder */
     262        else
     263        {
     264            msgCenter().cannotRewriteMachineFolder(m_strMachineFolder, thisImp());
     265            return false;
     266        }
    259267    }
    260268
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