Opened 11 years ago

Last modified 11 years ago

#1456 closed defect (fixed)

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 Mateusz Łoskot)

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

comment:1 Changed 11 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. 

comment:2 Changed 11 years ago by hobu

Description: modified (diff)
Milestone: 1.4.1

comment:3 Changed 11 years ago by Mateusz Łoskot

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