Changeset 107662 in vbox
- Timestamp:
- Jan 10, 2025 3:01:24 PM (4 months ago)
- svn:sync-xref-src-repo-rev:
- 166754
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp
r107585 r107662 718 718 * @param fileDst Guest file (destination) to copy to the guest. Must be in opened and ready state already. 719 719 * @param fFileCopyFlags File copy flags. 720 * @param offCopy Offset (in bytes) where to start copying the source file. 720 * @param offCopy Absolute offset (in bytes) where to start reading from the source file. 721 * Set to UINT64_MAX to read following chunk at the current VFS file read position. 722 * Set to 0 to rewind reading the file. 721 723 * @param cbSize Size (in bytes) to copy from the source file. 722 724 */ … … 736 738 int vrc = VINF_SUCCESS; 737 739 738 if (offCopy )740 if (offCopy != UINT64_MAX) 739 741 { 740 742 uint64_t offActual; 741 vrc = RTVfsFileSeek(hVfsFile, offCopy, RTFILE_SEEK_END, &offActual);743 vrc = RTVfsFileSeek(hVfsFile, (RTFOFF)offCopy, RTFILE_SEEK_BEGIN, &offActual); 742 744 if (RT_FAILURE(vrc)) 743 745 { 744 746 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 745 Utf8StrFmt(tr("Seeking to offset %RU64 of host file \"%s\" failed: %Rrc"),746 offCopy, strSrcFile.c_str(), vrc));747 Utf8StrFmt(tr("Seeking to offset %RU64 (%#x) of host file \"%s\" failed: %Rrc"), 748 offCopy, offCopy, strSrcFile.c_str(), vrc)); 747 749 return vrc; 748 750 } … … 963 965 964 966 vrc = fileCopyToGuestInner(szSrcReal, hSrcFile, strDst, dstFile, 965 fFileCopyFlags, 0/* Offset, unused */, srcObjInfo.cbObject);967 fFileCopyFlags, UINT64_MAX /* Offset, unused */, srcObjInfo.cbObject); 966 968 967 969 int vrc2 = RTVfsFileRelease(hSrcFile); … … 2672 2674 else 2673 2675 { 2674 vrc = fileCopyToGuestInner(strFileSrc, hVfsFile, strFileDst, dstFile, FileCopyFlag_None, 0 /*offCopy*/, cbSrcSize); 2676 vrc = fileCopyToGuestInner(strFileSrc, hVfsFile, strFileDst, dstFile, FileCopyFlag_None, 2677 UINT64_MAX /* Offset, unused */, cbSrcSize); 2675 2678 2676 2679 int vrc2 = fileClose(dstFile);
Note:
See TracChangeset
for help on using the changeset viewer.