Changeset 97555 in vbox for trunk/src/VBox/Main
- Timestamp:
- Nov 15, 2022 5:07:35 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp
r97553 r97555 1673 1673 bool fDstExists = true; 1674 1674 1675 RTFSOBJINFO ObjInfo; 1676 RT_ZERO(ObjInfo); 1677 vrc = RTPathQueryInfoEx(strDstRootAbs.c_str(), &ObjInfo, RTFSOBJATTRADD_NOTHING, 1678 fFollowSymlinks ? RTPATH_F_FOLLOW_LINK : RTPATH_F_ON_LINK /* fFlags */); 1679 if (RT_FAILURE(vrc)) 1675 RTFSOBJINFO dstFsObjInfo; 1676 RT_ZERO(dstFsObjInfo); 1677 vrc = RTPathQueryInfoEx(strDstRootAbs.c_str(), &dstFsObjInfo, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK /* fFlags */); 1678 if (RT_SUCCESS(vrc)) 1679 { 1680 char szPathReal[RTPATH_MAX]; 1681 vrc = RTPathReal(strDstRootAbs.c_str(), szPathReal, sizeof(szPathReal)); 1682 if (RT_SUCCESS(vrc)) 1683 { 1684 vrc = RTPathQueryInfoEx(szPathReal, &dstFsObjInfo, RTFSOBJATTRADD_NOTHING, RTPATH_F_FOLLOW_LINK /* fFlags */); 1685 if (RT_SUCCESS(vrc)) 1686 { 1687 LogRel2(("Guest Control: Host destination is a symbolic link '%s' -> '%s' (%s)\n", 1688 strDstRootAbs.c_str(), szPathReal, 1689 GuestBase::fsObjTypeToStr(GuestBase::fileModeToFsObjType(dstFsObjInfo.Attr.fMode)))); 1690 } 1691 1692 strDstRootAbs = szPathReal; 1693 } 1694 } 1695 else 1680 1696 { 1681 1697 if ( vrc == VERR_FILE_NOT_FOUND … … 1698 1714 LogFlowFunc(("Directory: fDirCopyFlags=%#x, fCopyIntoExisting=%RTbool, fFollowSymlinks=%RTbool -> fDstExist=%RTbool (%s)\n", 1699 1715 pList->mSourceSpec.fDirCopyFlags, fCopyIntoExisting, fFollowSymlinks, 1700 fDstExists, GuestBase::fsObjTypeToStr(GuestBase::fileModeToFsObjType( ObjInfo.Attr.fMode))));1716 fDstExists, GuestBase::fsObjTypeToStr(GuestBase::fileModeToFsObjType(dstFsObjInfo.Attr.fMode)))); 1701 1717 1702 1718 if (fDstExists) 1703 1719 { 1704 switch ( ObjInfo.Attr.fMode & RTFS_TYPE_MASK)1720 switch (dstFsObjInfo.Attr.fMode & RTFS_TYPE_MASK) 1705 1721 { 1706 1722 case RTFS_TYPE_DIRECTORY: … … 1728 1744 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 1729 1745 Utf8StrFmt(tr("Unknown object type (%#x) on host for \"%s\""), 1730 ObjInfo.Attr.fMode & RTFS_TYPE_MASK, strDstRootAbs.c_str()));1746 dstFsObjInfo.Attr.fMode & RTFS_TYPE_MASK, strDstRootAbs.c_str())); 1731 1747 vrc = VERR_NOT_SUPPORTED; 1732 1748 break; … … 1816 1832 LogFlowFunc(("File: fFileCopyFlags=%#x, fCopyIntoExisting=%RTbool, fFollowSymlinks=%RTbool -> fDstExist=%RTbool (%s)\n", 1817 1833 pList->mSourceSpec.fFileCopyFlags, fCopyIntoExisting, fFollowSymlinks, 1818 fDstExists, GuestBase::fsObjTypeToStr(GuestBase::fileModeToFsObjType( ObjInfo.Attr.fMode))));1834 fDstExists, GuestBase::fsObjTypeToStr(GuestBase::fileModeToFsObjType(dstFsObjInfo.Attr.fMode)))); 1819 1835 1820 1836 if (fDstExists) 1821 1837 { 1822 switch ( ObjInfo.Attr.fMode & RTFS_TYPE_MASK)1838 switch (dstFsObjInfo.Attr.fMode & RTFS_TYPE_MASK) 1823 1839 { 1824 1840 case RTFS_TYPE_DIRECTORY: … … 1847 1863 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 1848 1864 Utf8StrFmt(tr("Unknown object type (%#x) on host for \"%s\""), 1849 ObjInfo.Attr.fMode & RTFS_TYPE_MASK, strDstRootAbs.c_str()));1865 dstFsObjInfo.Attr.fMode & RTFS_TYPE_MASK, strDstRootAbs.c_str())); 1850 1866 vrc = VERR_NOT_SUPPORTED; 1851 1867 break; … … 2018 2034 if (RT_SUCCESS(vrc)) 2019 2035 { 2020 LogRel2(("Guest Control: Host source symbolic link '%s' -> '%s' (%s)\n",2036 LogRel2(("Guest Control: Host source is a symbolic link '%s' -> '%s' (%s)\n", 2021 2037 strSrc.c_str(), szPathReal, 2022 2038 GuestBase::fsObjTypeToStr(GuestBase::fileModeToFsObjType(srcFsObjInfo.Attr.fMode))));
Note:
See TracChangeset
for help on using the changeset viewer.