Skip to content

Commit e8f3dbd

Browse files
committed
Fallback to old method if decodeUri returns an empty map
1 parent e433a10 commit e8f3dbd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/app/qgshandlebadlayers.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ QString QgsHandleBadLayers::filename( int row )
177177
if ( type == QLatin1String( "vector" ) )
178178
{
179179
const QVariantMap parts = QgsProviderRegistry::instance()->decodeUri( provider, datasource );
180-
return parts.value( QLatin1String( "path" ) ).toString();
180+
// if parts is empty then provider doesn't handle this method!
181+
return parts.empty() ? datasource : parts.value( QLatin1String( "path" ) ).toString();
181182
}
182183
else
183184
{

0 commit comments

Comments
 (0)