From a3ec18125ef7cf2436ef75490853172da6c4db1c Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Sun, 25 Jul 2021 08:03:44 +1000 Subject: [PATCH] Readonly --- src/core/browser/qgsfilebaseddataitemprovider.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/browser/qgsfilebaseddataitemprovider.cpp b/src/core/browser/qgsfilebaseddataitemprovider.cpp index c3264c21f70..d4180920506 100644 --- a/src/core/browser/qgsfilebaseddataitemprovider.cpp +++ b/src/core/browser/qgsfilebaseddataitemprovider.cpp @@ -187,7 +187,7 @@ QgsAbstractDatabaseProviderConnection *QgsFileDataCollectionItem::databaseConnec // do not print errors, but write to debug CPLPushErrorHandler( CPLQuietErrorHandler ); CPLErrorReset(); - gdal::dataset_unique_ptr hDS( GDALOpenEx( path().toUtf8().constData(), GDAL_OF_VECTOR, nullptr, nullptr, nullptr ) ); + gdal::dataset_unique_ptr hDS( GDALOpenEx( path().toUtf8().constData(), GDAL_OF_VECTOR | GDAL_OF_READONLY, nullptr, nullptr, nullptr ) ); CPLPopErrorHandler(); if ( ! hDS )