Changeset 53603 in vbox
- Timestamp:
- Dec 25, 2014 7:45:47 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 97369
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r53354 r53603 5266 5266 LogFunc(("Deleting file %s\n", strLocation.c_str())); 5267 5267 } 5268 ComPtr<IProgress> pProgress2; 5269 rc = pMedium->DeleteStorage(pProgress2.asOutParam()); 5270 if (FAILED(rc)) throw rc; 5271 rc = task.pProgress->WaitForAsyncProgressCompletion(pProgress2); 5272 if (FAILED(rc)) throw rc; 5273 /* Check the result of the asynchronous process. */ 5274 LONG iRc; 5275 rc = pProgress2->COMGETTER(ResultCode)(&iRc); 5276 if (FAILED(rc)) throw rc; 5277 /* If the thread of the progress object has an error, then 5278 * retrieve the error info from there, or it'll be lost. */ 5279 if (FAILED(iRc)) 5280 throw setError(ProgressErrorInfo(pProgress2)); 5268 if (pMedium->i_isMediumFormatFile()) 5269 { 5270 ComPtr<IProgress> pProgress2; 5271 rc = pMedium->DeleteStorage(pProgress2.asOutParam()); 5272 if (FAILED(rc)) throw rc; 5273 rc = task.pProgress->WaitForAsyncProgressCompletion(pProgress2); 5274 if (FAILED(rc)) throw rc; 5275 /* Check the result of the asynchronous process. */ 5276 LONG iRc; 5277 rc = pProgress2->COMGETTER(ResultCode)(&iRc); 5278 if (FAILED(rc)) throw rc; 5279 /* If the thread of the progress object has an error, then 5280 * retrieve the error info from there, or it'll be lost. */ 5281 if (FAILED(iRc)) 5282 throw setError(ProgressErrorInfo(pProgress2)); 5283 } 5281 5284 5282 5285 /* Close the medium, deliberately without checking the return 5283 -* code, and without leaving any trace in the error info, as5284 -* a failure here is a very minor issue, which shouldn't happen5285 -* as above we even managed to delete the medium. */5286 * code, and without leaving any trace in the error info, as 5287 * a failure here is a very minor issue, which shouldn't happen 5288 * as above we even managed to delete the medium. */ 5286 5289 { 5287 5290 ErrorInfoKeeper eik;
Note:
See TracChangeset
for help on using the changeset viewer.