Skip to content
Permalink
Browse files
skip .shp.xml and .aux.xml files in ogrdataitem
  • Loading branch information
etiennesky committed Apr 2, 2012
1 parent eca9640 commit 5e144ee9af2db329c2e582e14b1e19cdaa8e181c
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/providers/ogr/qgsogrdataitems.cpp
@@ -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;

0 comments on commit 5e144ee

Please sign in to comment.