Opened 17 years ago
Closed 14 years ago
#1521 closed defect (fixed)
Delete feature - .dbf file getting deleted
Reported by: | Owned by: | Mateusz Łoskot | |
---|---|---|---|
Priority: | highest | Milestone: | |
Component: | OGR_SF | Version: | 1.7.1 |
Severity: | critical | Keywords: | |
Cc: |
Description (last modified by )
I want to delete features from a shape file. When i try repack after deleting the features, the .dbf file it self is getting deleted.
When i trace down the repack function, i could find that in ogrshapelayer.cpp VSIRename(.....) returns OGRERR_FAILURE.
/* -------------------------------------------------------------------- */ /* Cleanup the old .dbf and rename the new one. */ /* -------------------------------------------------------------------- */ DBFClose( hDBF ); hDBF = hNewDBF; VSIUnlink( CPLResetExtension( pszFullName, "dbf" ) ); if( VSIRename( oTempFile, CPLResetExtension( pszFullName, "dbf" ) ) != 0 ) return OGRERR_FAILURE; ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Iam calling the delete feature and repack as follows
..... poLayer->DeleteFeature(iField) poDS->ExecuteSQL("REPACK myshapefile", NULL, NULL);
Change History (6)
comment:2 by , 17 years ago
The bug is fixed, so I resolve it changing the state to FIXED. Here is detailed changeset: http://trac.osgeo.org/gdal/changeset/10969 Vidhiyadharan, Please, verify and confirm if deleting features from a shapefile does work for you too.
comment:3 by , 17 years ago
(In reply to comment #2) Yes I have tested. Now iam able to delete features. Thank you very much.
comment:5 by , 14 years ago
Description: | modified (diff) |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Version: | 1.4.0 → 1.7.1 |
This recent report is directly related to this ticket and submitted fix. I've have made mistake by using Windows path separator instead of using native one.
comment:6 by , 14 years ago
Description: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | reopened → closed |
Fixed in trunk (r18897)
Note:
See TracTickets
for help on using tickets.