VirtualBox

Changeset 3993 in vbox for trunk/src/VBox/HostServices


Ignore:
Timestamp:
Aug 2, 2007 9:29:34 AM (17 years ago)
Author:
vboxsync
Message:

Fixed dir search on linux hosts

Location:
trunk/src/VBox/HostServices/SharedFolders
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedFolders/testcase/tstShflCase.cpp

    r3972 r3993  
    4141#undef Log
    4242#define Log(a)  printf a
     43#undef Log2
     44#define Log2    Log
    4345
    4446#define RTPathQueryInfo     rtPathQueryInfo
     
    192194    int            rc = VERR_FILE_NOT_FOUND;
    193195    PRTDIR         hSearch;
     196    char           szWildCard[4];
     197
     198    Log2(("vbsfCorrectCasing: %s %s\n", pszFullPath, pszStartComponent));
    194199
    195200    cbComponent = strlen(pszStartComponent);
     
    208213    *(pszStartComponent-1) = 0;
    209214    strcpy(pDirEntry->szName, pszFullPath);
    210     strcat(pDirEntry->szName, "\\*");
     215    szWildCard[0] = RTPATH_DELIMITER;
     216    szWildCard[1] = '*';
     217    szWildCard[2] = 0;
     218    strcat(pDirEntry->szName, szWildCard);
     219
    211220    rc = RTDirOpenFiltered (&hSearch, pDirEntry->szName, RTDIRFILTER_WINNT);
    212221    *(pszStartComponent-1) = RTPATH_DELIMITER;
     
    230239                continue;
    231240        }
     241
     242        Log2(("vbsfCorrectCasing: found %s\n", &pDirEntry->szName[0]));
    232243        if (    pDirEntry->cbName == cbComponent
    233244            &&  !RTStrICmp(pszStartComponent, &pDirEntry->szName[0]))
  • trunk/src/VBox/HostServices/SharedFolders/vbsf.cpp

    r3992 r3993  
    101101    int            rc = VERR_FILE_NOT_FOUND;
    102102    PRTDIR         hSearch;
     103    char           szWildCard[4];
    103104
    104105    Log2(("vbsfCorrectCasing: %s %s\n", pszFullPath, pszStartComponent));
     
    119120    *(pszStartComponent-1) = 0;
    120121    strcpy(pDirEntry->szName, pszFullPath);
    121     strcat(pDirEntry->szName, "\\*");
     122    szWildCard[0] = RTPATH_DELIMITER;
     123    szWildCard[1] = '*';
     124    szWildCard[2] = 0;
     125    strcat(pDirEntry->szName, szWildCard);
     126
    122127    rc = RTDirOpenFiltered (&hSearch, pDirEntry->szName, RTDIRFILTER_WINNT);
    123128    *(pszStartComponent-1) = RTPATH_DELIMITER;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette