VirtualBox

Changeset 32064 in vbox for trunk/src


Ignore:
Timestamp:
Aug 29, 2010 9:36:51 AM (14 years ago)
Author:
vboxsync
Message:

Main/OVF: fix UUID messup with multiple disks on OVF export in vbox:Machine

File:
1 edited

Legend:

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

    r31698 r32064  
    660660 *
    661661 * @param elmToAddVirtualSystemsTo XML element to append elements to.
     662 * @param pllElementsWithUuidAttributes out: list of XML elements produced here with UUID attributes for quick fixing by caller later
    662663 * @param vsdescThis The IVirtualSystemDescription instance for which to write XML.
    663664 * @param enFormat OVF format (0.9 or 1.0).
     
    15981599            // but those would refer to the UUID of the _source_ image (which we created the
    15991600            // export image from); those UUIDs need to be fixed to the export image
     1601            Utf8Str strGuidSourceCurly = guidSource.toStringCurly();
    16001602            for (std::list<xml::ElementNode*>::iterator eit = llElementsWithUuidAttributes.begin();
    16011603                 eit != llElementsWithUuidAttributes.end();
     
    16031605            {
    16041606                xml::ElementNode *pelmImage = *eit;
    1605                 // overwrite existing uuid attribute
    1606                 pelmImage->setAttribute("uuid", guidTarget.toStringCurly());
     1607                Utf8Str strUUID;
     1608                pelmImage->getAttributeValue("uuid", strUUID);
     1609                if (strUUID == strGuidSourceCurly)
     1610                    // overwrite existing uuid attribute
     1611                    pelmImage->setAttribute("uuid", guidTarget.toStringCurly());
    16071612            }
    16081613        }
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