Ticket #1456 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

OGRShapeLayer SetFeature() DeleteFeature() do not set dirty header flag

Reported by: d0rian@… Owned by: warmerdam
Priority: highest Milestone: 1.4.1
Component: OGR_SF Version: 1.4.0
Severity: normal Keywords:
Cc:

Description (last modified by mloskot) (diff)

createFeature sets bHeaderDirty which is used by the sync to file function.

set and delete feature need to also set the bHeaderDirty flag or the changes are not written to disk with the sync function unless you createFeature or destroy the datasource.

Change History

Changed 5 years ago by warmerdam

I have confirmed these.  

In fact deleting a record doesn't change the shapefile or dbf headers, but
it turns out that writing out the dbf header is the easiest way to also
force the current record to be written to disk.  

Likewise for SetFeature(). 

Applying fix in trunk and 1.4 branch. 

Changed 5 years ago by hobu

  • description modified (diff)
  • milestone set to 1.4.1

Changed 5 years ago by mloskot

  • description modified (diff)
Note: See TracTickets for help on using tickets.