equal
deleted
inserted
replaced
14 * |
14 * |
15 * Description: |
15 * Description: |
16 * |
16 * |
17 */ |
17 */ |
18 |
18 |
|
19 // when enabled this macro copies the database to c:\data on launch for debug purposes |
|
20 //#define COPY_DB |
|
21 |
19 #include <commdb.h> |
22 #include <commdb.h> |
20 #include "PodcastModel.h" |
23 #include "PodcastModel.h" |
21 #include "FeedEngine.h" |
24 #include "FeedEngine.h" |
22 #include "SettingsEngine.h" |
25 #include "SettingsEngine.h" |
23 #include "ShowEngine.h" |
26 #include "ShowEngine.h" |
342 |
345 |
343 if (iDB == NULL) { |
346 if (iDB == NULL) { |
344 // open DB |
347 // open DB |
345 TBuf8<KMaxFileName> filename8; |
348 TBuf8<KMaxFileName> filename8; |
346 filename8.Copy(dbFileName); |
349 filename8.Copy(dbFileName); |
|
350 |
|
351 #ifdef COPY_DB |
|
352 DP("Copying DB to c:\\data"); |
|
353 TFileName copyName; |
|
354 copyName.Copy(_L("C:\\data\\")); |
|
355 copyName.Append(KDBFileName); |
|
356 BaflUtils::CopyFile(iFsSession, dbFileName, copyName); |
|
357 #endif |
|
358 |
347 int rc = sqlite3_open((const char*) filename8.PtrZ(), &iDB); |
359 int rc = sqlite3_open((const char*) filename8.PtrZ(), &iDB); |
348 if(rc != SQLITE_OK){ |
360 if(rc != SQLITE_OK){ |
349 User::Leave(KErrCorrupt); |
361 User::Leave(KErrCorrupt); |
350 } |
362 } |
351 |
363 |