Skip to content
Permalink
Browse files

Ensure .tif.aux.xml, .png.aux.xml etc are also blocklisted

  • Loading branch information
nyalldawson committed Nov 5, 2020
1 parent 67e1a80 commit 519222f1ad5f92de7ba19529877ecd2ae2c85885
Showing with 5 additions and 1 deletion.
  1. +1 −1 src/core/providers/gdal/qgsgdalprovider.cpp
  2. +4 −0 tests/src/python/test_qgsproviderregistry.py
@@ -2367,7 +2367,7 @@ bool QgsGdalProviderMetadata::uriIsBlocklisted( const QString &uri ) const
const QString suffix = fi.completeSuffix();

// internal details only
if ( suffix.compare( QLatin1String( "aux.xml" ), Qt::CaseInsensitive ) == 0 )
if ( suffix.compare( QLatin1String( "aux.xml" ), Qt::CaseInsensitive ) == 0 || suffix.endsWith( QLatin1String( ".aux.xml" ), Qt::CaseInsensitive ) )
return true;
if ( suffix.compare( QLatin1String( "tif.xml" ), Qt::CaseInsensitive ) == 0 )
return true;
@@ -73,6 +73,10 @@ def testUriIsBlocklisted(self):
# internal details only -- we should be hiding these uris!
self.assertTrue(QgsProviderRegistry.instance().uriIsBlocklisted('/home/nyall/me.shp.xml'))
self.assertTrue(QgsProviderRegistry.instance().uriIsBlocklisted('/home/nyall/me.aux.xml'))
self.assertTrue(QgsProviderRegistry.instance().uriIsBlocklisted('/home/nyall/me.AUX.XML'))
self.assertTrue(QgsProviderRegistry.instance().uriIsBlocklisted('/home/nyall/me.tif.aux.xml'))
self.assertTrue(QgsProviderRegistry.instance().uriIsBlocklisted('/home/nyall/me.tif.AUX.XML'))
self.assertTrue(QgsProviderRegistry.instance().uriIsBlocklisted('/home/nyall/me.png.aux.xml'))
self.assertTrue(QgsProviderRegistry.instance().uriIsBlocklisted('/home/nyall/me.tif.xml'))


0 comments on commit 519222f

Please sign in to comment.
You can’t perform that action at this time.