diff -r debf68073f2f -r 142dacf7b30e mtpfws/mtpfw/dataproviders/devdp/src/cmtpdevicedp.cpp --- a/mtpfws/mtpfw/dataproviders/devdp/src/cmtpdevicedp.cpp Wed Sep 15 13:07:27 2010 +0300 +++ b/mtpfws/mtpfw/dataproviders/devdp/src/cmtpdevicedp.cpp Wed Oct 13 15:29:02 2010 +0300 @@ -388,9 +388,7 @@ if(extnpluginMap ) { - CleanupStack::PushL(extnpluginMap); iExtnPluginMapArray.AppendL(extnpluginMap); - CleanupStack::Pop(extnpluginMap); } } @@ -416,14 +414,7 @@ TInt lengthOfRight( folderRight.Length()); TFileName folderLeft; - // get root path of storage - TInt driveNumber; - User::LeaveIfError(Framework().Fs().CharToDrive(folderRight[0], driveNumber)); - RBuf rootDirPath; - rootDirPath.CreateL(KMaxFileName); - rootDirPath.CleanupClosePushL(); - iDevDpSingletons.ConfigMgr().GetRootDirPathL(driveNumber, rootDirPath); - rootDirPath.Insert(0, folderRight.Mid(0, 2));// get drive: + _LIT( KRootFolder, "?:\\"); /* Go through from beginning. @@ -441,7 +432,7 @@ lengthOfRight = folderRight.Length()-pos -1; folderRight.Set( folderRight.Right( lengthOfRight )); - if ( rootDirPath.FindF(folderLeft) != KErrNotFound) + if ( KErrNotFound != folderLeft.Match( KRootFolder )) { //first time, root folder //continue @@ -451,7 +442,7 @@ handle = Framework().ObjectMgr().HandleL( folderLeft ); } while( KMTPHandleNone != handle ); - CleanupStack::PopAndDestroy(&rootDirPath); + if ( KMTPHandleNone == handle ) {