Changeset 39628 in vbox for trunk/src/VBox/HostServices/SharedFolders
- Timestamp:
- Dec 15, 2011 2:01:33 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 75423
- Location:
- trunk/src/VBox/HostServices/SharedFolders
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedFolders/service.cpp
r39627 r39628 244 244 else 245 245 { 246 pszFolderName = (char*)RTStrAlloc(cbFolderName );246 pszFolderName = (char*)RTStrAlloc(cbFolderName + 1); 247 247 AssertReturn(pszFolderName, VERR_NO_MEMORY); 248 248 249 rc = SSMR3GetStrZ(pSSM, mapping.pszFolderName, cbFolderName);249 rc = SSMR3GetStrZ(pSSM, pszFolderName, cbFolderName + 1); 250 250 AssertRCReturn(rc, rc); 251 251 mapping.pszFolderName = pszFolderName; -
trunk/src/VBox/HostServices/SharedFolders/vbsf.cpp
r39627 r39628 42 42 #endif 43 43 44 // never follow symbolic links */45 //#define SHFL_RT_LINK(pClient) ((pClient)->fu32Flags & SHFL_CF_SYMLINKS ? RTPATH_F_ON_LINK : RTPATH_F_FOLLOW_LINK)46 #define SHFL_RT_LINK(pClient) (RTPATH_F_ON_LINK)47 44 48 45 /** … … 139 136 strcat(pDirEntry->szName, szWildCard); 140 137 141 rc = RTDirOpenFiltered(&hSearch, pDirEntry->szName, RTDIRFILTER_WINNT, RTDIROPEN FILTERED_FLAGS_NO_SYMLINKS);138 rc = RTDirOpenFiltered(&hSearch, pDirEntry->szName, RTDIRFILTER_WINNT, RTDIROPEN_FLAGS_NO_SYMLINKS); 142 139 *(pszStartComponent-1) = RTPATH_DELIMITER; 143 140 if (RT_FAILURE(rc)) … … 148 145 size_t cbDirEntrySize = cbDirEntry; 149 146 150 rc = RTDirReadEx(hSearch, pDirEntry, &cbDirEntrySize, RTFSOBJATTRADD_NOTHING, SHFL_RT_LINK(pClient));147 rc = RTDirReadEx(hSearch, pDirEntry, &cbDirEntrySize, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK); 151 148 if (rc == VERR_NO_MORE_FILES) 152 149 break; … … 426 423 if (RT_SUCCESS(rc)) 427 424 { 428 /* When the host file system is case sensitive and the guest expects a case insensitive fs, then problems can occur */ 425 /* When the host file system is case sensitive and the guest expects 426 * a case insensitive fs, then problems can occur */ 429 427 if ( vbsfIsHostMappingCaseSensitive(root) 430 428 && !vbsfIsGuestMappingCaseSensitive(root)) … … 435 433 if (fWildCard || fPreserveLastComponent) 436 434 { 437 /* strip off the last path component, that has to be preserved: contains the wildcard(s) or a 'rename' target. */ 435 /* strip off the last path component, that has to be preserved: 436 * contains the wildcard(s) or a 'rename' target. */ 438 437 size_t cb = strlen(pszFullPath); 439 438 char *pszSrc = pszFullPath + cb - 1; … … 470 469 471 470 /** @todo don't check when creating files or directories; waste of time */ 472 rc = RTPathQueryInfoEx(pszFullPath, &info, RTFSOBJATTRADD_NOTHING, SHFL_RT_LINK(pClient));471 rc = RTPathQueryInfoEx(pszFullPath, &info, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK); 473 472 if (rc == VERR_FILE_NOT_FOUND || rc == VERR_PATH_NOT_FOUND) 474 473 { … … 484 483 { 485 484 *pszSrc = 0; 486 rc = RTPathQueryInfoEx(pszFullPath, &info, RTFSOBJATTRADD_NOTHING, SHFL_RT_LINK(pClient));485 rc = RTPathQueryInfoEx(pszFullPath, &info, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK); 487 486 *pszSrc = RTPATH_DELIMITER; 488 487 if (rc == VINF_SUCCESS) … … 520 519 fEndOfString = false; 521 520 *pszEnd = 0; 522 rc = RTPathQueryInfoEx(pszSrc, &info, RTFSOBJATTRADD_NOTHING, SHFL_RT_LINK(pClient));521 rc = RTPathQueryInfoEx(pszSrc, &info, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK); 523 522 Assert(rc == VINF_SUCCESS || rc == VERR_FILE_NOT_FOUND || rc == VERR_PATH_NOT_FOUND); 524 523 } … … 860 859 861 860 /** @todo Possible race left here. */ 862 if (RT_SUCCESS(RTPathQueryInfoEx(pszPath, &info, RTFSOBJATTRADD_NOTHING, SHFL_RT_LINK(pClient))))861 if (RT_SUCCESS(RTPathQueryInfoEx(pszPath, &info, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK))) 863 862 { 864 863 #ifdef RT_OS_WINDOWS … … 1032 1031 /* Open the directory now */ 1033 1032 rc = RTDirOpenFiltered(&pHandle->dir.Handle, pszPath, 1034 RTDIRFILTER_NONE, RTDIROPEN FILTERED_FLAGS_NO_SYMLINKS);1033 RTDIRFILTER_NONE, RTDIROPEN_FLAGS_NO_SYMLINKS); 1035 1034 if (RT_SUCCESS(rc)) 1036 1035 { … … 1135 1134 int rc; 1136 1135 1137 rc = RTPathQueryInfoEx(pszPath, &info, RTFSOBJATTRADD_NOTHING, SHFL_RT_LINK(pClient));1136 rc = RTPathQueryInfoEx(pszPath, &info, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK); 1138 1137 LogFlow(("SHFL_CF_LOOKUP\n")); 1139 1138 /* Client just wants to know if the object exists. */ … … 1241 1240 RTFSOBJINFO info; 1242 1241 1243 rc = RTPathQueryInfoEx(pszFullPath, &info, RTFSOBJATTRADD_NOTHING, SHFL_RT_LINK(pClient));1242 rc = RTPathQueryInfoEx(pszFullPath, &info, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK); 1244 1243 LogFlow(("RTPathQueryInfoEx returned %Rrc\n", rc)); 1245 1244 … … 1547 1546 { 1548 1547 rc = RTDirOpenFiltered(&pHandle->dir.SearchHandle, pszFullPath, 1549 RTDIRFILTER_WINNT, RTDIROPEN FILTERED_FLAGS_NO_SYMLINKS);1548 RTDIRFILTER_WINNT, RTDIROPEN_FLAGS_NO_SYMLINKS); 1550 1549 1551 1550 /* free the path string */ … … 1576 1575 pDirEntry = pDirEntryOrg; 1577 1576 1578 rc = RTDirReadEx(DirHandle, pDirEntry, &cbDirEntrySize, RTFSOBJATTRADD_NOTHING, SHFL_RT_LINK(pClient));1577 rc = RTDirReadEx(DirHandle, pDirEntry, &cbDirEntrySize, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK); 1579 1578 if (rc == VERR_NO_MORE_FILES) 1580 1579 { … … 2295 2294 { 2296 2295 RTFSOBJINFO info; 2297 rc = RTPathQueryInfoEx(pszFullNewPath, &info, RTFSOBJATTRADD_NOTHING, SHFL_RT_LINK(pClient));2296 rc = RTPathQueryInfoEx(pszFullNewPath, &info, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK); 2298 2297 if (RT_SUCCESS(rc)) 2299 2298 vbfsCopyFsObjInfoFromIprt(pInfo, &info);
Note:
See TracChangeset
for help on using the changeset viewer.