Skip to content

Commit

Permalink
Fallback to old method if decodeUri returns an empty map
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 28, 2018
1 parent e433a10 commit e8f3dbd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/qgshandlebadlayers.cpp
Expand Up @@ -177,7 +177,8 @@ QString QgsHandleBadLayers::filename( int row )
if ( type == QLatin1String( "vector" ) )
{
const QVariantMap parts = QgsProviderRegistry::instance()->decodeUri( provider, datasource );
return parts.value( QLatin1String( "path" ) ).toString();
// if parts is empty then provider doesn't handle this method!
return parts.empty() ? datasource : parts.value( QLatin1String( "path" ) ).toString();
}
else
{
Expand Down

0 comments on commit e8f3dbd

Please sign in to comment.