VirtualBox

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


Ignore:
Timestamp:
Oct 22, 2010 9:27:23 AM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
66913
Message:

Main-OVF: make the target format changeable

File:
1 edited

Legend:

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

    r33320 r33332  
    17391739            SystemProperties *pSysProps = mVirtualBox->getSystemProperties();
    17401740            AutoReadLock propsLock(pSysProps COMMA_LOCKVAL_SRC_POS);
    1741             // We are always exporting to VMDK stream optimized for now
    1742             format = pSysProps->mediumFormat("VMDK");
     1741            Utf8Str strFormat = "VMDK";
     1742            if (strTargetPath.endsWith("vdi", Utf8Str::CaseInsensitive))
     1743                strFormat = "VDI";
     1744            else if (strTargetPath.endsWith("vhd", Utf8Str::CaseInsensitive))
     1745                strFormat = "VHD";
     1746            format = pSysProps->mediumFormat(strFormat);
    17431747            if (format.isNull())
    17441748                throw setError(VBOX_E_NOT_SUPPORTED,
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette