VirtualBox

Changeset 33757 in vbox


Ignore:
Timestamp:
Nov 4, 2010 10:25:18 AM (14 years ago)
Author:
vboxsync
Message:

Storage/RAW: case insensitive extension matching
Main/Medium: For detection failures don't trigger an assertion which in strict builds lead to a crash. The error message is good enough.

Location:
trunk/src/VBox
Files:
2 edited

Legend:

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

    r33708 r33757  
    36933693                }
    36943694            }
    3695             else if (m->devType != convertToDeviceType(enmType))
     3695            else if (   enmType == VDTYPE_INVALID
     3696                     || m->devType != convertToDeviceType(enmType))
    36963697            {
    36973698                /*
  • trunk/src/VBox/Storage/RAW.cpp

    r33567 r33757  
    548548        && pszExtension)
    549549    {
    550         if (!strcmp(pszExtension, ".iso")) /* DVD images. */
     550        if (!RTStrICmp(pszExtension, ".iso")) /* DVD images. */
    551551        {
    552552            if (cbFile >= (32768 + sizeof(ISOVOLDESC)))
     
    578578            }
    579579        }
    580         else if (!strcmp(pszExtension, ".img") || !strcmp(pszExtension, ".ima")) /* Floppy images */
     580        else if (!RTStrICmp(pszExtension, ".img") || !RTStrICmp(pszExtension, ".ima")) /* Floppy images */
    581581        {
    582582            if (!(cbFile % 512))
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