Skip to content

Commit 52de4fb

Browse files
committedMay 4, 2016
Use consistently dataSourceUri() with QgsOgrConnPool (follow up of #3057)
1 parent 02be0cb commit 52de4fb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/providers/ogr/qgsogrprovider.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ QgsOgrProvider::QgsOgrProvider( QString const & uri )
385385
QgsOgrProvider::~QgsOgrProvider()
386386
{
387387
close();
388-
QgsOgrConnPool::instance()->unref( mFilePath );
388+
QgsOgrConnPool::instance()->unref( dataSourceUri() );
389389
}
390390

391391
QgsAbstractFeatureSource* QgsOgrProvider::featureSource() const
@@ -1216,7 +1216,7 @@ bool QgsOgrProvider::addAttributes( const QList<QgsField> &attributes )
12161216
{
12171217
// adding attributes in mapinfo requires to be able to delete the .dat file
12181218
// so drop any cached connections.
1219-
QgsOgrConnPool::instance()->invalidateConnections( filePath() );
1219+
QgsOgrConnPool::instance()->invalidateConnections( dataSourceUri() );
12201220
}
12211221

12221222
bool returnvalue = true;
@@ -2792,7 +2792,7 @@ QString QgsOgrProviderUtils::quotedValue( const QVariant& value )
27922792
bool QgsOgrProvider::syncToDisc()
27932793
{
27942794
//for shapefiles, remove spatial index files and create a new index
2795-
QgsOgrConnPool::instance()->unref( mFilePath );
2795+
QgsOgrConnPool::instance()->unref( dataSourceUri() );
27962796
bool shapeIndex = false;
27972797
if ( ogrDriverName == "ESRI Shapefile" )
27982798
{

0 commit comments

Comments
 (0)
Please sign in to comment.