Skip to content

Commit 5c40975

Browse files
committed
[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.
1 parent bc23f1d commit 5c40975

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/core/processing/qgsprocessingutils.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ QString QgsProcessingUtils::normalizeLayerSource( const QString &source )
295295
{
296296
QString normalized = source;
297297
normalized.replace( '\\', '/' );
298-
normalized.replace( '"', QLatin1String( "'" ) );
299298
return normalized.trimmed();
300299
}
301300

tests/src/analysis/testqgsprocessing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ void TestQgsProcessing::compatibleLayers()
682682
void TestQgsProcessing::normalizeLayerSource()
683683
{
684684
QCOMPARE( QgsProcessingUtils::normalizeLayerSource( "data\\layers\\test.shp" ), QString( "data/layers/test.shp" ) );
685-
QCOMPARE( QgsProcessingUtils::normalizeLayerSource( "data\\layers \"new\"\\test.shp" ), QString( "data/layers 'new'/test.shp" ) );
685+
QCOMPARE( QgsProcessingUtils::normalizeLayerSource( "data\\layers \"new\"\\test.shp" ), QString( "data/layers \"new\"/test.shp" ) );
686686
}
687687

688688
void TestQgsProcessing::context()

0 commit comments

Comments
 (0)