Skip to content
Browse files
eliminate the OGR message about not being able to open a read-only
.shp file (if it is read-only, qgis then tries to open it read-only,
so the OGR error message is unnecessary).

git-svn-id: c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Jul 21, 2006
1 parent 443e85b commit 6cf9f114db21427e3f8bcb763636ca17b5e5617d
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/providers/ogr/qgsogrprovider.cpp
@@ -88,8 +88,13 @@ QgsOgrProvider::QgsOgrProvider(QString const & uri)

QgsDebugMsg("Data source uri is " + uri);

// try to open for update
// try to open for update, but disable error messages to avoid a
// message if the file is read only, because we cope with that
// ourselves.
ogrDataSource = OGRSFDriverRegistrar::Open(QFile::encodeName(uri).constData(), TRUE, &ogrDriver);

if(ogrDataSource == NULL)
// try to open read-only

0 comments on commit 6cf9f11

Please sign in to comment.