Navigation Menu

Skip to content

Commit

Permalink
[processing] Don't replace " with ' when handling layer paths
Browse files Browse the repository at this point in the history
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 5c40975
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/core/processing/qgsprocessingutils.cpp
Expand Up @@ -295,7 +295,6 @@ QString QgsProcessingUtils::normalizeLayerSource( const QString &source )
{
QString normalized = source;
normalized.replace( '\\', '/' );
normalized.replace( '"', QLatin1String( "'" ) );
return normalized.trimmed();
}

Expand Down
2 changes: 1 addition & 1 deletion tests/src/analysis/testqgsprocessing.cpp
Expand Up @@ -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()
Expand Down

0 comments on commit 5c40975

Please sign in to comment.