Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[browser] prioritize OGR provider for archived files in basic scan mode
  • Loading branch information
nirvn committed Oct 2, 2018
1 parent df40eab commit e877050
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/providers/gdal/qgsgdaldataitems.cpp
Expand Up @@ -261,13 +261,15 @@ QGISEXTERN QgsDataItem *dataItem( QString path, QgsDataItem *parentItem )
QStringList ogrSupportedDbDriverNames;
ogrSupportedDbDriverNames << QStringLiteral( "GPKG" ) << QStringLiteral( "db" ) << QStringLiteral( "gdb" );

// return item without testing if:
// scanExtSetting
// or zipfile and scan zip == "Basic scan"
// skip archived item in favor of OGR if scanExtSetting && scanZipSetting is basic
if ( scanExtSetting && ( is_vsizip || is_vsitar || is_vsigzip ) && scanZipSetting == QLatin1String( "basic" ) )
{
return nullptr;
}

// return item without testing if scanExtSetting is true
// netCDF files can be both raster or vector, so fallback to opening
if ( ( scanExtSetting ||
( ( is_vsizip || is_vsitar ) && scanZipSetting == QLatin1String( "basic" ) ) ) &&
suffix != QLatin1String( "nc" ) )
if ( scanExtSetting && !is_vsizip && !is_vsigzip && !is_vsitar && suffix != QLatin1String( "nc" ) )
{
// Skip this layer if it's handled by ogr:
if ( ogrSupportedDbLayersExtensions.contains( suffix ) )
Expand Down

0 comments on commit e877050

Please sign in to comment.