Skip to content

Commit e877050

Browse files
committedOct 2, 2018
[browser] prioritize OGR provider for archived files in basic scan mode
1 parent df40eab commit e877050

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed
 

‎src/providers/gdal/qgsgdaldataitems.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -261,13 +261,15 @@ QGISEXTERN QgsDataItem *dataItem( QString path, QgsDataItem *parentItem )
261261
QStringList ogrSupportedDbDriverNames;
262262
ogrSupportedDbDriverNames << QStringLiteral( "GPKG" ) << QStringLiteral( "db" ) << QStringLiteral( "gdb" );
263263

264-
// return item without testing if:
265-
// scanExtSetting
266-
// or zipfile and scan zip == "Basic scan"
264+
// skip archived item in favor of OGR if scanExtSetting && scanZipSetting is basic
265+
if ( scanExtSetting && ( is_vsizip || is_vsitar || is_vsigzip ) && scanZipSetting == QLatin1String( "basic" ) )
266+
{
267+
return nullptr;
268+
}
269+
270+
// return item without testing if scanExtSetting is true
267271
// netCDF files can be both raster or vector, so fallback to opening
268-
if ( ( scanExtSetting ||
269-
( ( is_vsizip || is_vsitar ) && scanZipSetting == QLatin1String( "basic" ) ) ) &&
270-
suffix != QLatin1String( "nc" ) )
272+
if ( scanExtSetting && !is_vsizip && !is_vsigzip && !is_vsitar && suffix != QLatin1String( "nc" ) )
271273
{
272274
// Skip this layer if it's handled by ogr:
273275
if ( ogrSupportedDbLayersExtensions.contains( suffix ) )

0 commit comments

Comments
 (0)
Please sign in to comment.