VirtualBox

Changeset 93458 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jan 27, 2022 12:19:49 PM (3 years ago)
Author:
vboxsync
Message:

Reverting r149466: Main/UnattendedImpl: ​​​​bugref:10182. Returning string for VBOXOSTYPE_Unknown rather than empty string in case detection fails.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/UnattendedImpl.cpp

    r93410 r93458  
    393393    if (hrc == S_FALSE && enmOsType == VBOXOSTYPE_Unknown)
    394394        hrc = i_innerDetectIsoOSOs2(hVfsIso, &uBuf, &enmOsType);
    395     try {  mStrDetectedOSTypeId = Global::OSTypeId(enmOsType); }
    396     catch (std::bad_alloc &) { hrc = E_OUTOFMEMORY; }
     395    if (enmOsType != VBOXOSTYPE_Unknown)
     396    {
     397        try {  mStrDetectedOSTypeId = Global::OSTypeId(enmOsType); }
     398        catch (std::bad_alloc &) { hrc = E_OUTOFMEMORY; }
     399    }
    397400    return hrc;
    398401}
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