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
130 130 131 131 for ( ; i < nCount; i++ ) 132 132 { 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 133 138 // build complete file name for stat 134 139 osTemp1.clear(); 135 140 osTemp1.append( pszPath );
Note:
See TracTickets
for help on using tickets.