Skip to content
Permalink
Browse files

Fix creation of feature sinks when using windows style paths

  • Loading branch information
nyalldawson committed Jun 22, 2017
1 parent 9d8118c commit d8c44cb64393f1151dc5a15b60ac6888457b37f8
Showing with 6 additions and 1 deletion.
  1. +1 −1 src/core/processing/qgsprocessingutils.cpp
  2. +5 −0 tests/src/core/testqgsprocessing.cpp
@@ -229,7 +229,7 @@ QString QgsProcessingUtils::normalizeLayerSource( const QString &source )

void parseDestinationString( QString &destination, QString &providerKey, QString &uri, QString &format, QMap<QString, QVariant> &options )
{
QRegularExpression splitRx( "^(.*?):(.*)$" );
QRegularExpression splitRx( "^(.{3,}):(.*)$" );
QRegularExpressionMatch match = splitRx.match( destination );
if ( match.hasMatch() )
{
@@ -1135,6 +1135,11 @@ void TestQgsProcessing::createFeatureSink()
QCOMPARE( layer->featureCount(), 1L );
delete layer;
layer = nullptr;

//windows style path
destination = "d:\\temp\\create_feature_sink.tab";
sink.reset( QgsProcessingUtils::createFeatureSink( destination, context, fields, QgsWkbTypes::Polygon, QgsCoordinateReferenceSystem::fromEpsgId( 3111 ) ) );
QVERIFY( sink.get() );
}

void TestQgsProcessing::parameters()

0 comments on commit d8c44cb

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