Opened 9 years ago
Closed 9 years ago
#5535 closed defect (fixed)
VSIReadDirRecursive recurses forever
Reported by: | Kurt Schwehr | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | default | Version: | svn-trunk |
Severity: | normal | Keywords: | port, vsi |
Cc: |
Description (last modified by )
I'm seeing VSIReadDirRecursive recurse forever in a small test program pointing to a directory. It appears to be walking "." and ".." and thus heading for trouble.
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 );
Change History (2)
comment:1 by , 9 years ago
Description: | modified (diff) |
---|
comment:2 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Committed in trunk r27468