Skip to content

Commit

Permalink
Vector driver lists (open/save): add .gpkg.zip extension
Browse files Browse the repository at this point in the history
Fixes #59959
  • Loading branch information
rouault committed Jan 21, 2025
1 parent f999386 commit 8abc7d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/providers/ogr/qgsogrproviderutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,13 @@ QString createFilters( const QString &type )
}
else if ( driverName.startsWith( QLatin1String( "GPKG" ) ) )
{
#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3,7,0)
sFileFilters += createFileFilter_( QObject::tr( "GeoPackage" ), QStringLiteral( "*.gpkg *.gpkg.zip" ) );
sExtensions << QStringLiteral( "gpkg" ) << QStringLiteral( "gpkg.zip" );
#else
sFileFilters += createFileFilter_( QObject::tr( "GeoPackage" ), QStringLiteral( "*.gpkg" ) );
sExtensions << QStringLiteral( "gpkg" );
#endif
}
else if ( driverName.startsWith( QLatin1String( "GRASS" ) ) )
{
Expand Down
4 changes: 4 additions & 0 deletions src/core/qgsvectorfilewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1574,7 +1574,11 @@ class QgsVectorFileWriterMetadataContainer
QgsVectorFileWriter::MetaData(
QStringLiteral( "GeoPackage" ),
QObject::tr( "GeoPackage" ),
#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3,7,0)
QStringLiteral( "*.gpkg *.gpkg.zip" ),
#else
QStringLiteral( "*.gpkg" ),
#endif
QStringLiteral( "gpkg" ),
datasetOptions,
layerOptions,
Expand Down

0 comments on commit 8abc7d4

Please sign in to comment.