mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-02 00:02:12 -05:00
[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.
This commit is contained in:
parent
bc23f1d677
commit
5c40975fe7
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user