Removed delete of message files in RsDataService::resetDataStore.

This commit is contained in:
thunder2 2015-08-25 18:02:40 +02:00
parent 836b8668fc
commit 389f2f0528

View File

@ -1454,24 +1454,9 @@ int RsDataService::resetDataStore()
std::cerr << "resetDataStore() " << std::endl;
#endif
std::map<RsGxsGroupId, RsNxsGrp*> grps;
retrieveNxsGrps(grps, false, false);
std::map<RsGxsGroupId, RsNxsGrp*>::iterator mit
= grps.begin();
{
RsStackMutex stack(mDbMutex);
// remove all grp msgs files from service dir
for(; mit != grps.end(); ++mit){
std::string file = mServiceDir + "/" + mit->first.toStdString();
std::string msgFile = file + "-msgs";
remove(file.c_str()); // remove group file
remove(msgFile.c_str()); // and remove messages file
delete mit->second;
}
mDb->execSQL("DROP INDEX " + MSG_INDEX_GRPID);
mDb->execSQL("DROP TABLE " + DATABASE_RELEASE_TABLE_NAME);
mDb->execSQL("DROP TABLE " + MSG_TABLE_NAME);