Changeset 84649 in vbox for trunk/src/VBox/Main
- Timestamp:
- Jun 3, 2020 8:17:41 AM (5 years ago)
- Location:
- trunk/src/VBox/Main/src-client
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp
r84648 r84649 2661 2661 default: 2662 2662 strErr = Utf8StrFmt(Guest::tr("Unhandled error %Rrc for \"%s\" occurred for tool \"%s\" on guest -- please file a bug report"), 2663 guestErrorInfo.getRc(), guestErrorInfo.getWhat() , pszTool);2663 guestErrorInfo.getRc(), guestErrorInfo.getWhat().c_str(), pszTool); 2664 2664 break; 2665 2665 } -
trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp
r84648 r84649 459 459 * 460 460 * @return VBox status code. VINF_NO_CHANGE if file was skipped. 461 * @param strS ourceFull path of source file on the guest to copy.462 * @param strD estFull destination path and file name (host style) to copy file to.461 * @param strSrc Full path of source file on the guest to copy. 462 * @param strDst Full destination path and file name (host style) to copy file to. 463 463 * @param fFileCopyFlags File copy flags. 464 464 */ 465 int GuestSessionTask::fileCopyFromGuest(const Utf8Str &strSrc, const Utf8Str &strD est, FileCopyFlag_T fFileCopyFlags)466 { 467 LogFlowThisFunc(("strSource=%s, strDest=%s, enmFileCopyFlags=0x%x\n", strSrc.c_str(), strD est.c_str(), fFileCopyFlags));465 int GuestSessionTask::fileCopyFromGuest(const Utf8Str &strSrc, const Utf8Str &strDst, FileCopyFlag_T fFileCopyFlags) 466 { 467 LogFlowThisFunc(("strSource=%s, strDest=%s, enmFileCopyFlags=0x%x\n", strSrc.c_str(), strDst.c_str(), fFileCopyFlags)); 468 468 469 469 GuestFileOpenInfo srcOpenInfo; … … 537 537 if (RT_SUCCESS(rc)) 538 538 { 539 rc = RTPathQueryInfo(strD est.c_str(), &dstObjInfo, RTFSOBJATTRADD_NOTHING);539 rc = RTPathQueryInfo(strDst.c_str(), &dstObjInfo, RTFSOBJATTRADD_NOTHING); 540 540 if (RT_SUCCESS(rc)) 541 541 { … … 543 543 { 544 544 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 545 Utf8StrFmt(GuestSession::tr("Host file \"%s\" already exists"), strD est.c_str()));545 Utf8StrFmt(GuestSession::tr("Host file \"%s\" already exists"), strDst.c_str())); 546 546 rc = VERR_ALREADY_EXISTS; 547 547 } … … 555 555 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 556 556 Utf8StrFmt(GuestSession::tr("Host file \"%s\" has same or newer modification date"), 557 strD est.c_str()));557 strDst.c_str())); 558 558 fSkip = true; 559 559 } … … 565 565 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 566 566 Utf8StrFmt(GuestSession::tr("Host file lookup for \"%s\" failed: %Rrc"), 567 strD est.c_str(), rc));567 strDst.c_str(), rc)); 568 568 } 569 569 } … … 583 583 { 584 584 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 585 Utf8StrFmt(GuestSession::tr("Host file \"%s\" already exists"), strD est.c_str()));585 Utf8StrFmt(GuestSession::tr("Host file \"%s\" already exists"), strDst.c_str())); 586 586 rc = VERR_ALREADY_EXISTS; 587 587 } 588 588 else 589 pszDstFile = RTStrDup(strD est.c_str());589 pszDstFile = RTStrDup(strDst.c_str()); 590 590 } 591 591 else if (RTFS_IS_DIRECTORY(dstObjInfo.Attr.fMode)) … … 593 593 /* Build the final file name with destination path (on the host). */ 594 594 char szDstPath[RTPATH_MAX]; 595 RTStrPrintf2(szDstPath, sizeof(szDstPath), "%s", strD est.c_str());596 597 if ( !strD est.endsWith("\\")598 && !strD est.endsWith("/"))595 RTStrPrintf2(szDstPath, sizeof(szDstPath), "%s", strDst.c_str()); 596 597 if ( !strDst.endsWith("\\") 598 && !strDst.endsWith("/")) 599 599 RTPathAppend(szDstPath, sizeof(szDstPath), "/"); /* IPRT can handle / on all hosts. */ 600 600 … … 609 609 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 610 610 Utf8StrFmt(GuestSession::tr("Host file \"%s\" is a symbolic link"), 611 strD est.c_str()));611 strDst.c_str())); 612 612 rc = VERR_IS_A_SYMLINK; 613 613 } 614 614 else 615 pszDstFile = RTStrDup(strD est.c_str());615 pszDstFile = RTStrDup(strDst.c_str()); 616 616 } 617 617 else … … 622 622 } 623 623 else if (rc == VERR_FILE_NOT_FOUND) 624 pszDstFile = RTStrDup(strD est.c_str());624 pszDstFile = RTStrDup(strDst.c_str()); 625 625 626 626 if ( RT_SUCCESS(rc) … … 2579 2579 if (itFiles->fFlags & ISOFILE_FLAG_OPTIONAL) 2580 2580 fOptional = true; 2581 rc = copyFileToGuest(pSession, hVfsIso, itFiles->strSource, itFiles->strD est, fOptional);2581 rc = copyFileToGuest(pSession, hVfsIso, itFiles->strSource, itFiles->strDst, fOptional); 2582 2582 if (RT_FAILURE(rc)) 2583 2583 { 2584 2584 hr = setProgressErrorMsg(VBOX_E_IPRT_ERROR, 2585 2585 Utf8StrFmt(GuestSession::tr("Error while copying file \"%s\" to \"%s\" on the guest: %Rrc"), 2586 itFiles->strSource.c_str(), itFiles->strD est.c_str(), rc));2586 itFiles->strSource.c_str(), itFiles->strDst.c_str(), rc)); 2587 2587 break; 2588 2588 }
Note:
See TracChangeset
for help on using the changeset viewer.