VirtualBox

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


Ignore:
Timestamp:
Aug 17, 2009 3:55:30 PM (15 years ago)
Author:
vboxsync
Message:

Main: fix broken deletion of extradata

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

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

    r22300 r22304  
    27052705        }
    27062706
    2707         mData->m_pMachineConfigFile->mapExtraDataItems[strKey] = strValue;
     2707        if (strValue.isEmpty())
     2708            mData->m_pMachineConfigFile->mapExtraDataItems.erase(strKey);
     2709        else
     2710            mData->m_pMachineConfigFile->mapExtraDataItems[strKey] = strValue;
    27082711                // creates a new key if needed
    27092712
  • trunk/src/VBox/Main/VirtualBoxImpl.cpp

    r22295 r22304  
    15611561        AutoWriteLock alock(this);
    15621562
    1563         m_pMainConfigFile->mapExtraDataItems[strKey] = strValue;
     1563        if (strValue.isEmpty())
     1564            m_pMainConfigFile->mapExtraDataItems.erase(strKey);
     1565        else
     1566            m_pMainConfigFile->mapExtraDataItems[strKey] = strValue;
    15641567                // creates a new key if needed
    15651568
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