Changeset 55524 in vbox for trunk/src/VBox/Main
- Timestamp:
- Apr 29, 2015 2:45:20 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestDnDSourceImpl.cpp
r55520 r55524 30 30 #include <iprt/file.h> 31 31 #include <iprt/path.h> 32 #include <iprt/uri.h> 32 33 33 34 #include <iprt/cpp/utils.h> /* For unconst(). */ … … 463 464 pCtx->mData.cbProcessed = 0; 464 465 465 /* Assign new total size which also includes all paths + file 466 * data to receive from the guest. */ 466 /* 467 * Assign new total size which also includes all file data to receive 468 * from the guest. 469 */ 467 470 pCtx->mData.cbToProcess = cbTotalSize; 471 472 LogFlowFunc(("URI data => cbToProcess=%RU64\n", pCtx->mData.cbToProcess)); 468 473 } 469 474 } 470 475 } 471 472 if (RT_SUCCESS(rc))473 rc = i_updateProcess(pCtx, cbData);474 476 } 475 477 } … … 489 491 AssertReturn(cbPath, VERR_INVALID_PARAMETER); 490 492 491 LogFlowFunc(("pszPath=%s, cbPath=% zu, fMode=0x%x\n", pszPath, cbPath, fMode));493 LogFlowFunc(("pszPath=%s, cbPath=%RU32, fMode=0x%x\n", pszPath, cbPath, fMode)); 492 494 493 495 int rc; … … 505 507 506 508 if (RT_SUCCESS(rc)) 507 rc = i_updateProcess(pCtx, cbPath); 509 { 510 if (mDataBase.mProtocolVersion <= 2) 511 { 512 /* 513 * BUG: Protocol v1 does *not* send directory names in URI format, 514 * however, if this in a root URI directory (which came with the initial 515 * GUEST_DND_GH_SND_DATA message(s)) the total data announced was for 516 * root directory names which came in URI format, as an URI list. 517 * 518 * So construct an URI path locally to keep the accounting right. 519 */ 520 char *pszPathURI = RTUriCreate("file" /* pszScheme */, "/" /* pszAuthority */, 521 pszPath /* pszPath */, 522 NULL /* pszQuery */, NULL /* pszFragment */); 523 if (pszPathURI) 524 { 525 cbPath = strlen(pszPathURI); 526 cbPath += 3; /* Include "\r" + "\n" + termination -- see above. */ 527 528 LogFlowFunc(("URI pszPathURI=%s, cbPathURI=%RU32\n", pszPathURI, cbPath)); 529 RTStrFree(pszPathURI); 530 } 531 else 532 rc = VERR_NO_MEMORY; 533 } 534 535 if (RT_SUCCESS(rc)) 536 rc = i_updateProcess(pCtx, cbPath); 537 } 508 538 509 539 LogFlowFuncLeaveRC(rc);
Note:
See TracChangeset
for help on using the changeset viewer.