279 |
279 |
280 sqlite3* CPodcastModel::DB() |
280 sqlite3* CPodcastModel::DB() |
281 { |
281 { |
282 if (iDB == NULL) { |
282 if (iDB == NULL) { |
283 TFileName dbFileName; |
283 TFileName dbFileName; |
284 iFsSession.PrivatePath(dbFileName); |
284 dbFileName.Copy(iSettingsEngine->PrivatePath()); |
|
285 //iFsSession.PrivatePath(dbFileName); |
285 dbFileName.Append(KDBFileName); |
286 dbFileName.Append(KDBFileName); |
286 DP1("DB is at %S", &dbFileName); |
287 DP1("DB is at %S", &dbFileName); |
287 |
288 |
288 if (!BaflUtils::FileExists(iFsSession, dbFileName)) { |
289 if (!BaflUtils::FileExists(iFsSession, dbFileName)) { |
289 TFileName dbTemplate; |
290 TFileName dbTemplate; |
290 iFsSession.PrivatePath(dbTemplate); |
291 dbTemplate.Copy(iSettingsEngine->PrivatePath()); |
|
292 //iFsSession.PrivatePath(dbTemplate); |
291 dbTemplate.Append(KDBTemplateFileName); |
293 dbTemplate.Append(KDBTemplateFileName); |
292 DP1("No DB found, copying template from %S", &dbTemplate); |
294 DP1("No DB found, copying template from %S", &dbTemplate); |
293 BaflUtils::CopyFile(iFsSession, dbTemplate,dbFileName); |
295 BaflUtils::CopyFile(iFsSession, dbTemplate,dbFileName); |
294 iIsFirstStartup = ETrue; |
296 iIsFirstStartup = ETrue; |
295 } |
297 } |