Changeset 35243 in vbox
- Timestamp:
- Dec 20, 2010 1:37:12 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/src/VBox/Main/GuestCtrlImpl.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/GuestCtrlImpl.cpp
r35231 r35243 300 300 && !fCompleted) 301 301 { 302 vrc = RTFileRead(fileSource, (uint8_t*)aInputData.raw(), RT_MIN(cbToRead, _1M), &cbRead); 303 /* 304 * Some other error occured? There might be a chance that RTFileRead 305 * could not resolve/map the native error code to an IPRT code, so just 306 * print a generic error. 307 */ 308 if (RT_FAILURE(vrc)) 302 if (!cbToRead) 303 cbRead = 0; 304 else 309 305 { 310 rc = TaskGuest::setProgressErrorInfo(VBOX_E_IPRT_ERROR, aTask->progress, 311 Guest::tr("Could not read from file \"%s\" (%Rrc)"), 312 aTask->strSource.c_str(), vrc); 313 break; 306 vrc = RTFileRead(fileSource, (uint8_t*)aInputData.raw(), 307 RT_MIN(cbToRead, _1M), &cbRead); 308 /* 309 * Some other error occured? There might be a chance that RTFileRead 310 * could not resolve/map the native error code to an IPRT code, so just 311 * print a generic error. 312 */ 313 if (RT_FAILURE(vrc)) 314 { 315 rc = TaskGuest::setProgressErrorInfo(VBOX_E_IPRT_ERROR, aTask->progress, 316 Guest::tr("Could not read from file \"%s\" (%Rrc)"), 317 aTask->strSource.c_str(), vrc); 318 break; 319 } 314 320 } 315 321 316 /* Resize buffer to reflect amount we just have read. */317 if (cbRead > 0)318 aInputData.resize(cbRead);322 /* Resize buffer to reflect amount we just have read. 323 * Size 0 is allowed! */ 324 aInputData.resize(cbRead); 319 325 320 326 ULONG uFlags = ProcessInputFlag_None;
Note:
See TracChangeset
for help on using the changeset viewer.

