VirtualBox

Changeset 22699 in vbox


Ignore:
Timestamp:
Sep 2, 2009 9:32:40 AM (15 years ago)
Author:
vboxsync
Message:

Main/XML: fix bad snapshot description written by earlier trunk builds that confuses VirtualBox versions before 3.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/xml/Settings.cpp

    r22318 r22699  
    16541654        throw ConfigFileError(this, &elmSnapshot, N_("Required Snapshot/@name attribute is missing"));
    16551655
     1656    // earlier 3.1 trunk builds had a bug and added Description as an attribute, read it silently and write it back as an element
    16561657    elmSnapshot.getAttributeValue("Description", snap.strDescription);
    16571658
     
    21702171    pelmSnapshot->setAttribute("uuid", makeString(snap.uuid));
    21712172    pelmSnapshot->setAttribute("name", snap.strName);
    2172     pelmSnapshot->setAttribute("Description", snap.strDescription);
    2173 
    21742173    pelmSnapshot->setAttribute("timeStamp", makeString(snap.timestamp));
    21752174
    21762175    if (snap.strStateFile.length())
    21772176        pelmSnapshot->setAttribute("stateFile", snap.strStateFile);
     2177
     2178    if (snap.strDescription.length())
     2179        pelmSnapshot->createChild("Description")->addContent(snap.strDescription);
    21782180
    21792181    writeHardware(*pelmSnapshot, snap.hardware);
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