Changeset 39487 in vbox for trunk/src/VBox/Main/src-client/GuestCtrlImplTasks.cpp
- Timestamp:
- Dec 1, 2011 10:58:19 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestCtrlImplTasks.cpp
r39475 r39487 70 70 71 71 LogFlowFuncEnter(); 72 LogFlowFunc(("Guest %p\n", pGuest));73 72 74 73 HRESULT rc = S_OK; … … 295 294 } 296 295 else 296 { 297 297 rc = GuestTask::setProgressErrorInfo(VBOX_E_IPRT_ERROR, aTask->pProgress, 298 298 Guest::tr("Seeking file \"%s\" failed; offset = %RU64 (%Rrc)"), 299 299 aTask->strSource.c_str(), cbTransferedTotal, vrc); 300 break; 301 } 300 302 /* Resize buffer to reflect amount we just have read. 301 303 * Size 0 is allowed! */ … … 360 362 ExecuteProcessStatus_T retStatus; 361 363 ULONG uRetExitCode; 362 rc = pGuest->executeWaitForStatusChange(uPID, 0 /* No timeout. */, 363 &retStatus, &uRetExitCode); 364 365 rc = executeWaitForExit(uPID, execProgress, 0 /* No timeout */, 366 &retStatus, &uRetExitCode); 364 367 if (FAILED(rc)) 365 368 { … … 372 375 { 373 376 rc = GuestTask::setProgressErrorInfo(VBOX_E_IPRT_ERROR, aTask->pProgress, 374 Guest::tr("Guest reported error %uwhile copying file \"%s\" to \"%s\""),375 uRetExitCode, aTask->strSource.c_str(), aTask->strDest.c_str());377 Guest::tr("Guest process reported error %u (status: %u) while copying file \"%s\" to \"%s\""), 378 uRetExitCode, retStatus, aTask->strSource.c_str(), aTask->strDest.c_str()); 376 379 } 377 380 } … … 592 595 RTFileClose(hFileDest); 593 596 594 if ( cbTransfered595 && (cbTransfered != lFileSize))596 {597 /*598 * Only bitch about an unexpected end of a file when there already599 * was data read from that file. If this was the very first read we can600 * be (almost) sure that this file is not meant to be read by the specified user.601 */602 rc = GuestTask::setProgressErrorInfo(VBOX_E_IPRT_ERROR, aTask->pProgress,603 Guest::tr("Unexpected end of file \"%s\" (%u bytes total, %u bytes transferred)"),604 aTask->strSource.c_str(), lFileSize, cbTransfered);605 }606 607 597 if (SUCCEEDED(rc)) 608 aTask->pProgress->notifyComplete(S_OK); 598 { 599 if ( cbTransfered 600 && (cbTransfered != lFileSize)) 601 { 602 /* 603 * Only bitch about an unexpected end of a file when there already 604 * was data read from that file. If this was the very first read we can 605 * be (almost) sure that this file is not meant to be read by the specified user. 606 */ 607 rc = GuestTask::setProgressErrorInfo(VBOX_E_IPRT_ERROR, aTask->pProgress, 608 Guest::tr("Unexpected end of file \"%s\" (%u bytes total, %u bytes transferred)"), 609 aTask->strSource.c_str(), lFileSize, cbTransfered); 610 } 611 612 if (SUCCEEDED(rc)) 613 aTask->pProgress->notifyComplete(S_OK); 614 } 609 615 } 610 616 }
Note:
See TracChangeset
for help on using the changeset viewer.