Changeset 90752 in vbox
- Timestamp:
- Aug 19, 2021 3:34:26 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVM.cpp
r90739 r90752 168 168 QUuid uSnapshotId; 169 169 CProgress comProgress = comSessionMachine.TakeSnapshot(strSnapshotName, "", true, uSnapshotId); 170 if (comSessionMachine.isOk()) 171 { 172 /* Make sure progress valid: */ 170 if (!comSessionMachine.isOk()) 171 { 172 msgCenter().cannotTakeSnapshot(comSessionMachine, strMachineName, this); 173 return false; 174 } 175 else 176 { 177 /* Make sure progress initially valid: */ 173 178 if (!comProgress.isNull() && !comProgress.GetCompleted()) 174 179 { … … 200 205 return false; 201 206 } 202 } 203 else 204 { 205 msgCenter().cannotTakeSnapshot(comSessionMachine, strMachineName, this); 206 return false; 207 else 208 { 209 /* Look for created snapshot: */ 210 const CSnapshot comCreatedSnapshot = m_machine.FindSnapshot(uSnapshotId.toString()); 211 if (comCreatedSnapshot.isNull()) 212 { 213 msgCenter().cannotFindSnapshotByName(m_machine, strSnapshotName, this); 214 return false; 215 } 216 217 /* Update machine for cloning finally: */ 218 srcMachine = comCreatedSnapshot.GetMachine(); 219 } 207 220 } 208 221 209 222 /* Unlock machine finally: */ 210 223 comSession.UnlockMachine(); 211 212 /* Look for created snapshot: */213 const CSnapshot comCreatedSnapshot = m_machine.FindSnapshot(uSnapshotId.toString());214 if (comCreatedSnapshot.isNull())215 {216 msgCenter().cannotFindSnapshotByName(m_machine, strSnapshotName, this);217 return false;218 }219 220 /* Update machine for cloning finally: */221 srcMachine = comCreatedSnapshot.GetMachine();222 224 } 223 225
Note:
See TracChangeset
for help on using the changeset viewer.