Changeset 3964 in vbox
- Timestamp:
- Aug 1, 2007 2:44:20 PM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 23383
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedFolders/testcase/tstShflCase.cpp
r3961 r3964 42 42 #define Log(a) printf a 43 43 44 #define RTPathQueryInfo rtPathQueryInfo 44 #define RTPathQueryInfo rtPathQueryInfo 45 #define RTDirOpenFiltered rtDirOpenFiltered 46 #define RTDirClose rtDirClose 47 #define RTDirReadEx rtDirReadEx 45 48 46 49 static int iDirList = 0; … … 248 251 249 252 250 int testCase(char *pszFullPath )253 int testCase(char *pszFullPath, bool fWildCard = false) 251 254 { 252 255 int rc; 253 256 RTFSOBJINFO info; 257 char *pszWildCardComponent = NULL; 258 259 if (fWildCard) 260 { 261 /* strip off the last path component, that contains the wildcard(s) */ 262 uint32_t len = strlen(pszFullPath); 263 char *src = pszFullPath + len - 1; 264 265 while(src > pszFullPath) 266 { 267 if (*src == RTPATH_DELIMITER) 268 break; 269 src--; 270 } 271 if (*src == RTPATH_DELIMITER) 272 { 273 pszWildCardComponent = src; 274 *pszWildCardComponent = 0; 275 } 276 } 277 254 278 rc = RTPathQueryInfo(pszFullPath, &info, RTFSOBJATTRADD_NOTHING); 255 279 if (rc == VERR_FILE_NOT_FOUND || rc == VERR_PATH_NOT_FOUND) … … 328 352 329 353 } 354 if (fWildCard) 355 { 356 Assert(pszWildCardComponent); 357 *pszWildCardComponent = RTPATH_DELIMITER; 358 } 330 359 331 360 if (VBOX_SUCCESS(rc)) … … 349 378 strcpy(szTest, "c:\\TEST dir\\subDiR\\aTestje.baT"); 350 379 testCase(szTest); 380 _asm int 3; 381 strcpy(szTest, "c:\\TEST dir\\subDiR\\*"); 382 testCase(szTest, true); 351 383 return 0; 352 384 }
Note:
See TracChangeset
for help on using the changeset viewer.