mpxplugins/serviceplugins/collectionplugins/mpxsqlitepodcastdbplugin/src/mpxpodcastdbmanager.cpp
branchRCL_3
changeset 21 cb96c29156b2
parent 0 ff3acec5bc43
--- a/mpxplugins/serviceplugins/collectionplugins/mpxsqlitepodcastdbplugin/src/mpxpodcastdbmanager.cpp	Wed Jun 09 09:38:28 2010 +0300
+++ b/mpxplugins/serviceplugins/collectionplugins/mpxsqlitepodcastdbplugin/src/mpxpodcastdbmanager.cpp	Mon Jun 21 15:37:19 2010 +0300
@@ -80,7 +80,26 @@
 void CMPXPodcastDbManager::ConstructL()
     {
     MPX_FUNC("CMPXPodcastDbManager::ConstructL");
-    CMPXDbManager::ConstructL(TFileName(KMCDbFile));
+    //Find out if the system has an internal drive (eMMC)
+    TBool eMMC( EFalse );
+    TDriveInfo driveInfo;
+    if( Fs().Drive( driveInfo, EDriveE ) == KErrNone )
+    	{
+        if ( driveInfo.iDriveAtt & KDriveAttInternal )
+            eMMC = ETrue;
+        }
+
+    //Use different name for Dbs if the system has an internal drive vs. MMC-only.
+    //Since hard-coded drive letters in the Thumbnail URIs
+    //So Dbs are not interchangeable between an internal drive system and MMC-only system.
+    if( eMMC )	
+        {
+        CMPXDbManager::ConstructL(TFileName( KMCDbFileEMMC ));
+        }
+    else
+        {
+        CMPXDbManager::ConstructL(TFileName( KMCDbFile ));
+        }
     }
 
 // End of File