mpserviceplugins/mpxsqlitedbhgplugin/src/mpxcollectiondbmanager.cpp
changeset 38 b93f525c9244
parent 22 ecf06a08d4d9
--- a/mpserviceplugins/mpxsqlitedbhgplugin/src/mpxcollectiondbmanager.cpp	Fri Jun 11 19:36:32 2010 -0500
+++ b/mpserviceplugins/mpxsqlitedbhgplugin/src/mpxcollectiondbmanager.cpp	Fri Jun 25 17:21:37 2010 -0500
@@ -80,7 +80,26 @@
 void CMPXCollectionDbManager::ConstructL()
     {
     MPX_FUNC("CMPXCollectionDbManager::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