Skip to content

Commit 5e144ee

Browse files
committedApr 2, 2012
skip .shp.xml and .aux.xml files in ogrdataitem
1 parent eca9640 commit 5e144ee

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
 

‎src/providers/ogr/qgsogrdataitems.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,15 @@ QGISEXTERN QgsDataItem * dataItem( QString thePath, QgsDataItem* parentItem )
242242

243243
QStringList myExtensions = fileExtensions();
244244

245+
// skip *.aux.xml files (GDAL auxilary metadata files) and .shp.xml files (ESRI metadata)
246+
// unless that extension is in the list (*.xml might be though)
247+
if ( thePath.right( 8 ).toLower() == ".aux.xml" &&
248+
myExtensions.indexOf( "aux.xml" ) < 0 )
249+
return 0;
250+
if ( thePath.right( 8 ).toLower() == ".shp.xml" &&
251+
myExtensions.indexOf( "shp.xml" ) < 0 )
252+
return 0;
253+
245254
// skip .tar.gz files
246255
if ( thePath.right( 7 ) == ".tar.gz" )
247256
return 0;

0 commit comments

Comments
 (0)
Please sign in to comment.