VirtualBox

Changeset 35115 in vbox for trunk/src


Ignore:
Timestamp:
Dec 15, 2010 9:37:13 AM (14 years ago)
Author:
vboxsync
Message:

Frontends/VBoxManage: reorder code so that the medium type is set before attaching it to a storage controller

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp

    r34874 r35115  
    556556                if (!pMedium2Mount)
    557557                    throw Utf8StrFmt("Invalid UUID or filename \"%s\"", pszMedium);
     558            }
     559
     560            // set medium type, if so desired
     561            if (pMedium2Mount && mediumType != MediumType_Normal)
     562            {
     563                CHECK_ERROR(pMedium2Mount, COMSETTER(Type)(mediumType));
     564            }
     565
     566            if (pMedium2Mount && !bstrComment.isEmpty())
     567            {
     568                CHECK_ERROR(pMedium2Mount, COMSETTER(Description)(bstrComment.raw()));
    558569            }
    559570
     
    621632                break;
    622633            }
    623 
    624             // set medium type, if so desired
    625             if (pMedium2Mount && mediumType != MediumType_Normal)
    626             {
    627                 CHECK_ERROR(pMedium2Mount, COMSETTER(Type)(mediumType));
    628             }
    629 
    630             if (!bstrComment.isEmpty())
    631             {
    632                 CHECK_ERROR(pMedium2Mount, COMSETTER(Description)(bstrComment.raw()));
    633             }
    634634        }
    635635
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