Ticket #2259 (closed defect: fixed)
OGRSFDriver.Open methods do not always call DataSource.SetDriver
|Reported by:||ajolma||Owned by:||warmerdam|
For example Open() in ogrshapedriver.cpp does not call poDS-SetDriver? nor it is done in OGR_Dr_Open in ogrsfdriver.cpp. This leaves the driver undefined for datasources opened in this way. Open in ogrsfdriverregistrar.cpp works ok as it sets poDS->m_poDriver = poDriver;
I haven't checked all drivers, at least shapefile driver is buggy in this respect. Fixing this in OGR_Dr_Open would fix it only for the C API, but perhaps that would be enough?