Changeset 84998 in vbox for trunk/src/VBox/Main/src-client/GuestDnDTargetImpl.cpp
- Timestamp:
- Jun 29, 2020 4:34:22 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestDnDTargetImpl.cpp
r82968 r84998 882 882 AssertPtr(pObj); 883 883 884 RTCString strPath = pObj->Get DestPathAbs();884 RTCString strPath = pObj->GetPath(); 885 885 if (strPath.isEmpty()) 886 886 return VERR_INVALID_PARAMETER; … … 909 909 AssertPtr(pObj); 910 910 911 RTCString strPathSrc = pObj->Get SourcePathAbs();911 RTCString strPathSrc = pObj->GetPath(); 912 912 if (strPathSrc.isEmpty()) 913 913 return VERR_INVALID_PARAMETER; … … 922 922 { 923 923 LogRel2(("DnD: Opening host file '%s' for transferring to guest\n", strPathSrc.c_str())); 924 rc = pObj->OpenEx(strPathSrc, DnDURIObject::View_Source, 925 RTFILE_O_OPEN | RTFILE_O_READ | RTFILE_O_DENY_WRITE); 924 rc = pObj->Init(DnDURIObject::Type_File, strPathSrc); 925 if (RT_SUCCESS(rc)) 926 rc = pObj->Open(RTFILE_O_OPEN | RTFILE_O_READ | RTFILE_O_DENY_WRITE); 927 926 928 if (RT_FAILURE(rc)) 927 929 LogRel(("DnD: Opening host file '%s' failed, rc=%Rrc\n", strPathSrc.c_str(), rc)); … … 943 945 pMsg->setType(HOST_DND_HG_SND_FILE_HDR); 944 946 pMsg->setNextUInt32(0); /** @todo ContextID not used yet. */ 945 pMsg->setNextString(pObj->Get DestPathAbs().c_str()); /* pvName */946 pMsg->setNextUInt32((uint32_t)(pObj->Get DestPathAbs().length() + 1)); /* cbName */947 pMsg->setNextUInt32(0); 948 pMsg->setNextUInt32(pObj->GetMode()); 949 pMsg->setNextUInt64(pObj->GetSize()); 947 pMsg->setNextString(pObj->GetPath().c_str()); /* pvName */ 948 pMsg->setNextUInt32((uint32_t)(pObj->GetPath().length() + 1)); /* cbName */ 949 pMsg->setNextUInt32(0); /* uFlags */ 950 pMsg->setNextUInt32(pObj->GetMode()); /* fMode */ 951 pMsg->setNextUInt64(pObj->GetSize()); /* uSize */ 950 952 951 953 LogFlowFunc(("Sending file header ...\n")); 952 LogRel2(("DnD: Transferring host file to guest: %s(%RU64 bytes, mode 0x%x)\n",953 strPathSrc.c_str(), pObj->GetSize(), pObj->GetMode()));954 LogRel2(("DnD: Transferring host file '%s' to guest (%RU64 bytes, mode 0x%x)\n", 955 pObj->GetPath().c_str(), pObj->GetSize(), pObj->GetMode())); 954 956 955 957 /** @todo Set progress object title to current file being transferred? */ … … 1007 1009 if (mDataBase.m_uProtocolVersion <= 1) 1008 1010 { 1009 pMsg->setNextString(pObj->Get DestPathAbs().c_str()); /* pvName */1010 pMsg->setNextUInt32((uint32_t)(pObj->Get DestPathAbs().length() + 1)); /* cbName */1011 pMsg->setNextString(pObj->GetPath().c_str()); /* pvName */ 1012 pMsg->setNextUInt32((uint32_t)(pObj->GetPath().length() + 1)); /* cbName */ 1011 1013 } 1012 1014 else if (mDataBase.m_uProtocolVersion >= 2) … … 1044 1046 if (pObj->IsComplete()) /* Done reading? */ 1045 1047 { 1046 LogRel2(("DnD: Transferring file '%s' to guest complete\n", pObj->Get SourcePathAbs().c_str()));1047 LogFlowFunc(("File '%s' complete\n", pObj->Get SourcePathAbs().c_str()));1048 LogRel2(("DnD: Transferring file '%s' to guest complete\n", pObj->GetPath().c_str())); 1049 LogFlowFunc(("File '%s' complete\n", pObj->GetPath().c_str())); 1048 1050 1049 1051 /* DnDURIObject::Read() returns VINF_EOF when finished reading the entire fire, … … 1054 1056 1055 1057 if (RT_FAILURE(rc)) 1056 LogRel(("DnD: Reading from host file '%s' failed, rc=%Rrc\n", pObj->Get SourcePathAbs().c_str(), rc));1058 LogRel(("DnD: Reading from host file '%s' failed, rc=%Rrc\n", pObj->GetPath().c_str(), rc)); 1057 1059 1058 1060 LogFlowFuncLeaveRC(rc); … … 1449 1451 AssertPtr(pCurObj); 1450 1452 1451 DnDURIObject::Type enmType = pCurObj->GetType(); 1453 const DnDURIObject::Type enmType = pCurObj->GetType(); 1454 1452 1455 LogRel3(("DnD: Processing: srcPath=%s, dstPath=%s, enmType=%RU32, cbSize=%RU32\n", 1453 pCurObj->Get SourcePathAbs().c_str(), pCurObj->GetDestPathAbs().c_str(),1456 pCurObj->GetPath().c_str(), pCurObj->GetPath().c_str(), 1454 1457 enmType, pCurObj->GetSize())); 1455 1458 … … 1465 1468 { 1466 1469 AssertMsgFailed(("enmType=%RU32 is not supported for srcPath=%s, dstPath=%s\n", 1467 enmType, pCurObj->Get SourcePathAbs().c_str(), pCurObj->GetDestPathAbs().c_str()));1470 enmType, pCurObj->GetPath().c_str(), pCurObj->GetPath().c_str())); 1468 1471 rc = VERR_NOT_SUPPORTED; 1469 1472 } … … 1478 1481 if (fRemove) 1479 1482 { 1480 LogFlowFunc(("Removing \"%s\" from list, rc=%Rrc\n", pCurObj->Get SourcePathAbs().c_str(), rc));1483 LogFlowFunc(("Removing \"%s\" from list, rc=%Rrc\n", pCurObj->GetPath().c_str(), rc)); 1481 1484 pCtx->mURI.removeObjCurrent(); 1482 1485 }
Note:
See TracChangeset
for help on using the changeset viewer.