Opened 10 years ago

Last modified 10 years ago

#5535 closed defect

VSIReadDirRecursive recurses forever — at Initial Version

Reported by: Kurt Schwehr Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: svn-trunk
Severity: normal Keywords: port, vsi
Cc:

Description

I'm seeing VSIReadDirRecursive recurse forever in a small test program pointing to a directory.

source:trunk/gdal/port/cpl_vsil.cpp#L131

Proposed fix:

  • cpl_vsil.cpp

     
    130130
    131131        for ( ; i < nCount; i++ )
    132132        {
     133            // Do not recurse up the tree.
     134            // TODO(schwehr): Is this portable to all filesystems?
     135            if (EQUAL(".", papszFiles[i]) || EQUAL("..", papszFiles[i]))
     136              continue;
     137
    133138            // build complete file name for stat
    134139            osTemp1.clear();
    135140            osTemp1.append( pszPath );

Change History (0)

Note: See TracTickets for help on using tickets.