--- a/engine/src/PodcastModel.cpp Sun Apr 04 15:54:17 2010 +0100
+++ b/engine/src/PodcastModel.cpp Sun Apr 04 16:23:10 2010 +0100
@@ -253,10 +253,8 @@
}
}
-void CPodcastModel::ResetDB()
+void CPodcastModel::DropDB()
{
- DP("CPodcastModel::ResetDB BEGIN");
-
if (iDB != NULL)
{
sqlite3_close(iDB);
@@ -272,6 +270,23 @@
{
BaflUtils::DeleteFile(iFsSession, dbFileName);
}
+ }
+
+void CPodcastModel::ResetDB()
+ {
+ DP("CPodcastModel::ResetDB BEGIN");
+
+ DropDB();
+
+ TFileName dbFileName;
+ dbFileName.Copy(iSettingsEngine->PrivatePath());
+ dbFileName.Append(KDBFileName);
+
+ // remove the old DB file
+ if (BaflUtils::FileExists(iFsSession, dbFileName))
+ {
+ BaflUtils::DeleteFile(iFsSession, dbFileName);
+ }
// copy template to new DB
TFileName dbTemplate;