VirtualBox

Changeset 28870 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 28, 2010 2:33:11 PM (15 years ago)
Author:
vboxsync
Message:

VBoxManage/snapshot: fixed selection of snapshots by name (regression from UUID => Bstr)

File:
1 edited

Legend:

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

    r28800 r28870  
    421421            {
    422422                /* assume it's a UUID */
    423                 Bstr guidSnap(a->argv[2]);
    424                 if (!guidSnap.isEmpty())
    425                 {
    426                     CHECK_ERROR_BREAK(pMachine, GetSnapshot(guidSnap, snapshot.asOutParam()));
    427                 }
    428                 else
     423                rc = pMachine->GetSnapshot(Bstr(a->argv[2]), snapshot.asOutParam());
     424                if (FAILED(rc) || !snapshot)
    429425                {
    430426                    /* then it must be a name */
     
    484480
    485481            /* assume it's a UUID */
    486             Bstr guidSnap(a->argv[2]);
    487             if (!guidSnap.isEmpty())
    488             {
    489                 CHECK_ERROR_BREAK(pMachine, GetSnapshot(guidSnap, snapshot.asOutParam()));
    490             }
    491             else
     482            rc = pMachine->GetSnapshot(Bstr(a->argv[2]), snapshot.asOutParam());
     483            if (FAILED(rc) || !snapshot)
    492484            {
    493485                /* then it must be a name */
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