Changeset 13627

Show
Ignore:
Timestamp:
01/30/08 11:30:29 (4 months ago)
Author:
warmerdam
Message:

introduce GDAL_DISABLE_READDIR_ON_OPEN config option (#2158)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/gdal/gcore/gdalopeninfo.cpp

    r11404 r13627  
    123123    else if( bStatOK && !bIsDirectory ) 
    124124    { 
    125         CPLString osDir = CPLGetDirname( pszFilename ); 
    126         papszSiblingFiles = VSIReadDir( osDir ); 
     125        if( CSLTestBoolean(  
     126                CPLGetConfigOptions( "GDAL_DISABLE_READDIR_ON_OPEN", "NO" )) ) 
     127        { 
     128            /* skip reading the directory */ 
     129        } 
     130        else 
     131        { 
     132            CPLString osDir = CPLGetDirname( pszFilename ); 
     133            papszSiblingFiles = VSIReadDir( osDir ); 
     134        } 
    127135    } 
    128136    else