Changeset 24374 in vbox for trunk/src/VBox
- Timestamp:
- Nov 5, 2009 10:50:38 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedFolders/vbsf.cpp
r24350 r24374 243 243 244 244 static int vbsfBuildFullPath (SHFLCLIENTDATA *pClient, SHFLROOT root, PSHFLSTRING pPath, 245 uint32_t cbPath, char **ppszFullPath, uint32_t *pcbFullPathRoot, bool fWildCard = false) 245 uint32_t cbPath, char **ppszFullPath, uint32_t *pcbFullPathRoot, 246 bool fWildCard = false, bool fPreserveLastComponent = false) 246 247 { 247 248 int rc = VINF_SUCCESS; … … 458 459 { 459 460 RTFSOBJINFO info; 460 char *psz WildCardComponent = NULL;461 462 if (fWildCard )463 { 464 /* strip off the last path component, that contains the wildcard(s)*/461 char *pszLastComponent = NULL; 462 463 if (fWildCard || fPreserveLastComponent) 464 { 465 /* strip off the last path component, that has to be preserved: contains the wildcard(s) or a 'rename' target. */ 465 466 uint32_t len = (uint32_t)strlen(pszFullPath); 466 467 char *src = pszFullPath + len - 1; … … 488 489 } 489 490 490 if (fHaveWildcards )491 if (fHaveWildcards || fPreserveLastComponent) 491 492 { 492 psz WildCardComponent = src;493 *psz WildCardComponent = 0;493 pszLastComponent = src; 494 *pszLastComponent = 0; 494 495 } 495 496 } … … 581 582 582 583 } 583 if (psz WildCardComponent)584 *psz WildCardComponent = RTPATH_DELIMITER;584 if (pszLastComponent) 585 *pszLastComponent = RTPATH_DELIMITER; 585 586 586 587 /* might be a new file so don't fail here! */ … … 2074 2075 return rc; 2075 2076 2076 rc = vbsfBuildFullPath (pClient, root, pDest, pDest->u16Size, &pszFullPathDest, NULL );2077 rc = vbsfBuildFullPath (pClient, root, pDest, pDest->u16Size, &pszFullPathDest, NULL, false, true); 2077 2078 if (RT_SUCCESS (rc)) 2078 2079 {
Note:
See TracChangeset
for help on using the changeset viewer.