id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc 1521,Delete feature - .dbf file getting deleted,vdharan2001@…,Mateusz Łoskot,"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); }}}",defect,closed,highest,,OGR_SF,1.7.1,critical,fixed,,