VirtualBox

Changeset 21486 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Jul 10, 2009 4:35:40 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
49930
Message:

RTDirOpenFiltered: If trailing slash, then it has no pattern whatever the caller thinks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/dir.cpp

    r19212 r21486  
    701701     * Find the last component, i.e. where the filter criteria starts and the dir name ends.
    702702     */
    703     const char *pszFilter = enmFilter != RTDIRFILTER_NONE
    704         ? RTPathFilename(pszPath)
    705         : NULL;
     703    const char *pszFilter;
     704    if (enmFilter == RTDIRFILTER_NONE)
     705        pszFilter = NULL;
     706    else
     707    {
     708        pszFilter = RTPathFilename(pszPath);
     709        if (!pszFilter) /* trailing slash => directory to read => no filter. */
     710            enmFilter = RTDIRFILTER_NONE;
     711    }
    706712
    707713    /*
     
    772778
    773779        RTDirClose(pDir);
    774         rc = RTDirRemove(szAbsPath);   
     780        rc = RTDirRemove(szAbsPath);
    775781    }
    776782
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