diff --git a/include/isam.cpp b/include/isam.cpp index 5393abb42..1a7f1d860 100755 --- a/include/isam.cpp +++ b/include/isam.cpp @@ -1896,10 +1896,16 @@ int TSystemisamfile::update( tmpfname.ext("dbf"); fcopy((const char*)tmpfname,(const char*)fname); ::remove((const char*)tmpfname); - tmpfname.ext("fpt"); + if (c & 1) + tmpfname.ext("fpt"); + else + tmpfname.ext("dbt"); if (fexist((const char *) tmpfname)) { - fname.ext("fpt"); + if (c & 1) + fname.ext("fpt"); + else + fname.ext("dbt"); fcopy((const char*)tmpfname,(const char*)fname); ::remove((const char*)tmpfname); }