Navigation Menu

Skip to content

Commit

Permalink
Disable FEATURE_DATASET layer option if its value is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
aharfoot authored and m-kuhn committed May 14, 2016
1 parent 894d520 commit cfb6100
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/qgsvectorfilewriter.cpp
Expand Up @@ -283,6 +283,13 @@ void QgsVectorFileWriter::init( QString vectorFileName, QString fileEncoding, co
QString layerName = QFileInfo( vectorFileName ).baseName();
OGRwkbGeometryType wkbType = ogrTypeFromWkbType( geometryType );

// Remove FEATURE_DATASET layer option (used for ESRI File GDB driver) if its value is not set
int optIndex = layerOptions.indexOf( "FEATURE_DATASET=" );
if ( optIndex != -1 )
{
layerOptions.removeAt( optIndex );
}

if ( !layerOptions.isEmpty() )
{
options = new char *[ layerOptions.size()+1 ];
Expand Down

0 comments on commit cfb6100

Please sign in to comment.