Skip to content

Commit

Permalink
Also get src path from details.providerUriParams
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Aug 22, 2018
1 parent f4daa8c commit 2da1d6f
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/core/qgsvectorfilewriter.cpp
Expand Up @@ -2555,14 +2555,7 @@ QgsVectorFileWriter::WriterError QgsVectorFileWriter::writeAsVectorFormat( Prepa
// Special rules for OGR layers
if ( details.providerType == QLatin1String( "ogr" ) && !details.dataSourceUri.isEmpty() )
{
QStringList theURIParts = details.dataSourceUri.split( '|' );
QgsStringMap srcUriParams;
QString srcFileName;
if ( theURIParts.length() > 0 )
{
srcFileName = theURIParts[0];
}

QString srcFileName( details.providerUriParams.value( QLatin1String( "path" ) ).toString() );
if ( QFile::exists( srcFileName ) && QFileInfo( fileName ).canonicalFilePath() == QFileInfo( srcFileName ).canonicalFilePath() )
{
// Check the layer name too if it's a GPKG/SpatiaLite/SQLite OGR driver (pay attention: camel case in layerName)
Expand Down

0 comments on commit 2da1d6f

Please sign in to comment.