Opened 17 years ago

Last modified 17 years ago

#1456 closed defect (fixed)

OGRShapeLayer SetFeature() DeleteFeature() do not set dirty header flag — at Version 2

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 hobu)

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 (2)

comment:1 by warmerdam, 17 years ago

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. 

comment:2 by hobu, 17 years ago

Description: modified (diff)
Milestone: 1.4.1
Note: See TracTickets for help on using tickets.