Skip to content

Commit 2da1d6f

Browse files
committed
Also get src path from details.providerUriParams
1 parent f4daa8c commit 2da1d6f

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/core/qgsvectorfilewriter.cpp

+1-8
Original file line numberDiff line numberDiff line change
@@ -2555,14 +2555,7 @@ QgsVectorFileWriter::WriterError QgsVectorFileWriter::writeAsVectorFormat( Prepa
25552555
// Special rules for OGR layers
25562556
if ( details.providerType == QLatin1String( "ogr" ) && !details.dataSourceUri.isEmpty() )
25572557
{
2558-
QStringList theURIParts = details.dataSourceUri.split( '|' );
2559-
QgsStringMap srcUriParams;
2560-
QString srcFileName;
2561-
if ( theURIParts.length() > 0 )
2562-
{
2563-
srcFileName = theURIParts[0];
2564-
}
2565-
2558+
QString srcFileName( details.providerUriParams.value( QLatin1String( "path" ) ).toString() );
25662559
if ( QFile::exists( srcFileName ) && QFileInfo( fileName ).canonicalFilePath() == QFileInfo( srcFileName ).canonicalFilePath() )
25672560
{
25682561
// Check the layer name too if it's a GPKG/SpatiaLite/SQLite OGR driver (pay attention: camel case in layerName)

0 commit comments

Comments
 (0)