Skip to content
Permalink
Browse files

Also get src path from details.providerUriParams

  • Loading branch information
elpaso committed Aug 22, 2018
1 parent f4daa8c commit 2da1d6f6ba6b2b6d9011007c5641a1386c2407d4
Showing with 1 addition and 8 deletions.
  1. +1 −8 src/core/qgsvectorfilewriter.cpp
@@ -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)

0 comments on commit 2da1d6f

Please sign in to comment.
You can’t perform that action at this time.