Skip to content
Permalink
Browse files

[processing] Don't replace " with ' when handling layer paths

Since netcdf, and possibly other gdal drivers, use layer uris
of the format NETCDF:"/tmp/test.nc":var1 we can't safely
remove or reformat these quotations.
  • Loading branch information
nyalldawson committed Feb 15, 2018
1 parent bc23f1d commit 5c40975fe7a255733157a897af3ab1eb485f9755
Showing with 1 addition and 2 deletions.
  1. +0 −1 src/core/processing/qgsprocessingutils.cpp
  2. +1 −1 tests/src/analysis/testqgsprocessing.cpp
@@ -295,7 +295,6 @@ QString QgsProcessingUtils::normalizeLayerSource( const QString &source )
{
QString normalized = source;
normalized.replace( '\\', '/' );
normalized.replace( '"', QLatin1String( "'" ) );
return normalized.trimmed();
}

@@ -682,7 +682,7 @@ void TestQgsProcessing::compatibleLayers()
void TestQgsProcessing::normalizeLayerSource()
{
QCOMPARE( QgsProcessingUtils::normalizeLayerSource( "data\\layers\\test.shp" ), QString( "data/layers/test.shp" ) );
QCOMPARE( QgsProcessingUtils::normalizeLayerSource( "data\\layers \"new\"\\test.shp" ), QString( "data/layers 'new'/test.shp" ) );
QCOMPARE( QgsProcessingUtils::normalizeLayerSource( "data\\layers \"new\"\\test.shp" ), QString( "data/layers \"new\"/test.shp" ) );
}

void TestQgsProcessing::context()

0 comments on commit 5c40975

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