mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Fallback to readonly dataset if needed
This commit is contained in:
parent
a432b51b4f
commit
ea13e0c60e
@ -388,6 +388,12 @@ void QgsOgrProviderConnection::setDefaultCapabilities()
|
||||
mCapabilities |= DeleteField;
|
||||
|
||||
gdal::ogr_datasource_unique_ptr hDS( GDALOpenEx( uri().toUtf8().constData(), GDAL_OF_VECTOR | GDAL_OF_UPDATE, nullptr, nullptr, nullptr ) );
|
||||
if ( !hDS )
|
||||
{
|
||||
// fallback to read only otherwise
|
||||
hDS.reset( GDALOpenEx( uri().toUtf8().constData(), GDAL_OF_VECTOR, nullptr, nullptr, nullptr ) );
|
||||
}
|
||||
|
||||
if ( hDS )
|
||||
{
|
||||
if ( OGR_DS_TestCapability( hDS.get(), ODsCCurveGeometries ) )
|
||||
|
Loading…
x
Reference in New Issue
Block a user