VirtualBox

Changeset 33347 in vbox


Ignore:
Timestamp:
Oct 22, 2010 12:40:44 PM (14 years ago)
Author:
vboxsync
Message:

Main-OVF: Only backends with create capabilities are allowed.

File:
1 edited

Legend:

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

    r33346 r33347  
    16801680        ComObjPtr<MediumFormat> trgFormat = pSysProps->mediumFormatFromExtension(&pszExt[1]);
    16811681        if (trgFormat.isNull())
     1682            throw setError(VBOX_E_NOT_SUPPORTED,
     1683                           tr("Could not find a valid medium format for the target disk '%s'"),
     1684                           strTargetPath.c_str());
     1685        /* Check the capabilities. We need create capabilities. */
     1686        ULONG lCabs = 0;
     1687        rc = trgFormat->COMGETTER(Capabilities)(&lCabs);
     1688        if (FAILED(rc)) throw rc;
     1689        if (!(   ((lCabs & MediumFormatCapabilities_CreateFixed) == MediumFormatCapabilities_CreateFixed)
     1690              || ((lCabs & MediumFormatCapabilities_CreateFixed) == MediumFormatCapabilities_CreateDynamic)))
    16821691            throw setError(VBOX_E_NOT_SUPPORTED,
    16831692                           tr("Could not find a valid medium format for the target disk '%s'"),
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