diff -r 2ee890d2f7e7 -r 959ca709b049 mmappcomponents/harvester/filehandler/src/mpxharvesterfilehandlerimp.cpp --- a/mmappcomponents/harvester/filehandler/src/mpxharvesterfilehandlerimp.cpp Fri Jun 11 14:04:53 2010 +0300 +++ b/mmappcomponents/harvester/filehandler/src/mpxharvesterfilehandlerimp.cpp Fri Jun 11 19:35:01 2010 -0500 @@ -12,7 +12,7 @@ * Contributors: * * Description: Handles all file related activities -* Version : %version: da1mmcf#72.1.14.2.4.1.4.1.2.5.3 % << Don't touch! Updated by Synergy at check-out. +* Version : %version: da1mmcf#72.1.14.2.4.1.4.1.2.5.4 % << Don't touch! Updated by Synergy at check-out. * */ @@ -61,8 +61,8 @@ #include "mpxbrokenlinkcleanup.h" // ============ CONSTANTS ========== -_LIT( KDefaultScanPath, "C:\\DATA\\|E:\\" ); -_LIT( KDefaultBlockPath, "\\SYS\\|\\PRIVATE\\|\\SYSTEM\\|\\CITIES\\"); +_LIT( KDefaultScanPath, "C:\\DATA\\|E:\\|F:\\" ); +_LIT( KDefaultBlockPath, "\\SYS\\|\\PRIVATE\\|\\SYSTEM\\|\\CITIES\\|\\SOUNDS\\SIMPLE\\|\\GAMES\\|\\RESOURCE\\|\\IMAGES\\"); _LIT( KDefaultContainers, ".odf|.dcf|.asf|.m4a|.mp4" ); _LIT( KDefaultAutoScanFolder, "C:\\data\\sounds\\digital\\|E:\\sounds\\digital\\"); const TUid KCRUIDHarvesterFeatures = { 0x101FFCD2 }; @@ -1737,15 +1737,8 @@ // TBuf<255> scanPath; TBuf<255> blockPath; - CRepository* cenrep(NULL); - TRAPD( err, cenrep = CRepository::NewL( KCRUIDHarvesterFeatures ) ); - if( err == KErrNone ) - { - cenrep->Get( KHarvesterScanPathKey, scanPath ); - cenrep->Get( KHarvesterBlockPathKey, blockPath ); - delete cenrep; - } - else + TRAPD( err, FetchPathsFromCenrepL(scanPath,blockPath) ); + if( err ) { scanPath = KDefaultScanPath; blockPath = KDefaultBlockPath; @@ -1758,6 +1751,20 @@ } // --------------------------------------------------------------------------- +// Fetches scan - and block - paths from cenrep +// --------------------------------------------------------------------------- +// +void CMPXHarvesterFileHandlerImp::FetchPathsFromCenrepL( TDes16& aScanPath, + TDes16& aBlockPath ) + { + MPX_FUNC("CMPXHarvesterFileHandlerImp::FetchPathsFromCenrepL"); + CRepository* cenrep( CRepository::NewLC( KCRUIDHarvesterFeatures ) ); + User::LeaveIfError( cenrep->Get( KHarvesterScanPathKey, aScanPath ) ); + User::LeaveIfError( cenrep->Get( KHarvesterBlockPathKey, aBlockPath ) ); + CleanupStack::PopAndDestroy(cenrep); + } + +// --------------------------------------------------------------------------- // Parses cenrep setting for container file types // --------------------------------------------------------------------------- //