Skip to content

Commit

Permalink
skip .shp.xml and .aux.xml files in ogrdataitem
Browse files Browse the repository at this point in the history
  • Loading branch information
etiennesky committed Apr 2, 2012
1 parent eca9640 commit 5e144ee
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/providers/ogr/qgsogrdataitems.cpp
Expand Up @@ -242,6 +242,15 @@ QGISEXTERN QgsDataItem * dataItem( QString thePath, QgsDataItem* parentItem )

QStringList myExtensions = fileExtensions();

// skip *.aux.xml files (GDAL auxilary metadata files) and .shp.xml files (ESRI metadata)
// unless that extension is in the list (*.xml might be though)
if ( thePath.right( 8 ).toLower() == ".aux.xml" &&
myExtensions.indexOf( "aux.xml" ) < 0 )
return 0;
if ( thePath.right( 8 ).toLower() == ".shp.xml" &&
myExtensions.indexOf( "shp.xml" ) < 0 )
return 0;

// skip .tar.gz files
if ( thePath.right( 7 ) == ".tar.gz" )
return 0;
Expand Down

0 comments on commit 5e144ee

Please sign in to comment.