VirtualBox

Changeset 28189 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Apr 12, 2010 9:39:49 AM (15 years ago)
Author:
vboxsync
Message:

Main: OVF crash fix, settings::ConfigFileBase must not be copyable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ApplianceImplImport.cpp

    r28165 r28189  
    19341934    Assert(vsdescThis->m->pConfig);
    19351935
    1936     // make a deep copy of the machine settings here because we will tinker
    1937     // with it by replacing disk UUIDs
    1938     settings::MachineConfigFile config = *vsdescThis->m->pConfig;
     1936    settings::MachineConfigFile &config = *vsdescThis->m->pConfig;
    19391937
    19401938    Utf8Str strDefaultHardDiskFolder;
     
    19421940    if (FAILED(rc)) throw rc;
    19431941
    1944     // step 1): scan the machine config for UUIDs
     1942    // step 1): scan the machine config for attachments
    19451943    for (settings::StorageControllersList::iterator sit = config.storageMachine.llStorageControllers.begin();
    19461944         sit != config.storageMachine.llStorageControllers.end();
     
    19771975                    searchUniqueDiskImageFilePath(strTargetPath);
    19781976
    1979                     // step 2): import disks and map the old and new UUIDs
     1977                    // step 2): for each attachment, import the disk...
    19801978                    ComPtr<IMedium> pTargetHD;
    19811979                    importOneDiskImage(di,
     
    19841982                                       stack);
    19851983
     1984                    // ... and replace the old UUID in the machine config with the one of
     1985                    // the imported disk that was just created
    19861986                    Bstr hdId;
    19871987                    rc = pTargetHD->COMGETTER(Id)(hdId.asOutParam());
    19881988                    if (FAILED(rc)) throw rc;
    19891989
    1990                     // replace the old UUID in the machine config with the new one
    19911990                    d.uuid = hdId;
     1991
    19921992                    fFound = true;
    19931993                    break;
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