Changeset 73037 in vbox for trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp
- Timestamp:
- Jul 10, 2018 3:58:05 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 123591
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp
r73036 r73037 1110 1110 case FsObjType_Symlink: 1111 1111 { 1112 if (mSourceSpec. fFollowSymlinks)1112 if (mSourceSpec.Type.Dir.fFollowSymlinks) 1113 1113 { 1114 1114 /** @todo Symlink handling from guest is not imlemented yet. 1115 1115 * See IGuestSession::symlinkRead(). */ 1116 LogRel2(("Guest Control: Warning: Symlink support on guest side not available, skipping \"%s\"", 1117 strEntry.c_str())); 1116 1118 } 1117 1119 break; … … 1219 1221 case RTFS_TYPE_SYMLINK: 1220 1222 { 1221 if (mSourceSpec. fFollowSymlinks)1223 if (mSourceSpec.Type.Dir.fFollowSymlinks) 1222 1224 { 1223 1225 Utf8Str strEntryAbs = strPathAbs + Utf8Str(Entry.szName); … … 1376 1378 Utf8Str strDst = mDest; 1377 1379 1380 bool fFollowSymlinks; 1381 1378 1382 if (itSrc->enmType == FsObjType_Directory) 1379 1383 { … … 1389 1393 strDst += Utf8StrFmt("%s", RTPathFilenameEx(strSrc.c_str(), mfPathStyle)); 1390 1394 } 1391 } 1392 1393 LogFlowFunc(("strSrc=%s, strDst=%s\n", strSrc.c_str(), strDst.c_str())); 1395 1396 fFollowSymlinks = itSrc->Type.Dir.fFollowSymlinks; 1397 } 1398 else 1399 { 1400 fFollowSymlinks = itSrc->Type.File.fCopyFlags & FileCopyFlag_FollowLinks; 1401 } 1402 1403 LogFlowFunc(("strSrc=%s, strDst=%s, fFollowSymlinks=%RTbool\n", strSrc.c_str(), strDst.c_str(), fFollowSymlinks)); 1394 1404 1395 1405 GuestFsObjData srcObjData; int rcGuest; 1396 rc = mSession->i_fsQueryInfo(strSrc, itSrc->fFollowSymlinks ? TRUE : FALSE, 1397 srcObjData, &rcGuest); 1406 rc = mSession->i_fsQueryInfo(strSrc, fFollowSymlinks, srcObjData, &rcGuest); 1398 1407 if (RT_FAILURE(rc)) 1399 1408 { … … 1752 1761 AssertPtr(pList); 1753 1762 1754 const bool fFollowSymlinks = pList->mSourceSpec.fFollowSymlinks;1755 const bool fCopyIntoExisting = pList->mSourceSpec.Type.Dir.fCopyFlags & DirectoryCopyFlag_CopyIntoExisting;1756 const uint32_t fDirMode= 0700; /** @todo Play safe by default; implement ACLs. */1763 bool fCopyIntoExisting; 1764 bool fFollowSymlinks; 1765 uint32_t fDirMode = 0700; /** @todo Play safe by default; implement ACLs. */ 1757 1766 1758 1767 LogFlowFunc(("List: srcRootAbs=%s, dstRootAbs=%s\n", pList->mSrcRootAbs.c_str(), pList->mDstRootAbs.c_str())); … … 1761 1770 if (pList->mSourceSpec.enmType == FsObjType_Directory) 1762 1771 { 1763 rc = directoryCreate(pList->mDstRootAbs.c_str(), DirectoryCreateFlag_None, fDirMode, fFollowSymlinks); 1772 fCopyIntoExisting = pList->mSourceSpec.Type.Dir.fCopyFlags & DirectoryCopyFlag_CopyIntoExisting; 1773 fFollowSymlinks = pList->mSourceSpec.Type.Dir.fFollowSymlinks; 1774 1775 rc = directoryCreate(pList->mDstRootAbs.c_str(), DirectoryCreateFlag_None, fDirMode, 1776 pList->mSourceSpec.Type.Dir.fFollowSymlinks); 1764 1777 if ( rc == VWRN_ALREADY_EXISTS 1765 1778 && !fCopyIntoExisting) … … 1768 1781 } 1769 1782 } 1783 else if (pList->mSourceSpec.enmType == FsObjType_File) 1784 { 1785 fCopyIntoExisting = !(pList->mSourceSpec.Type.File.fCopyFlags & FileCopyFlag_NoReplace); 1786 fFollowSymlinks = pList->mSourceSpec.Type.File.fCopyFlags & FileCopyFlag_FollowLinks; 1787 } 1788 else 1789 AssertFailed(); 1770 1790 1771 1791 FsEntries::const_iterator itEntry = pList->mVecEntries.begin(); … … 1804 1824 LogFlowFunc(("File '%s': %s -> %s\n", pEntry->strPath.c_str(), strSrcAbs.c_str(), strDstAbs.c_str())); 1805 1825 if (!pList->mSourceSpec.fDryRun) 1806 rc = fileCopyToGuest(strSrcAbs, strDstAbs, FileCopyFlag_None);1826 rc = fileCopyToGuest(strSrcAbs, strDstAbs, pList->mSourceSpec.Type.File.fCopyFlags); 1807 1827 break; 1808 1828
Note:
See TracChangeset
for help on using the changeset viewer.