--- a/mtpfws/mtpfw/dataproviders/devdp/src/cmtpgetstorageinfo.cpp Fri Mar 12 15:46:41 2010 +0200
+++ b/mtpfws/mtpfw/dataproviders/devdp/src/cmtpgetstorageinfo.cpp Mon Mar 15 12:43:12 2010 +0200
@@ -129,6 +129,7 @@
*/
void CMTPGetStorageInfo::BuildStorageInfoL()
{
+ iIsCDrive = EFalse;
SetupDriveVolumeInfoL();
SetStorageTypeL();
SetFileSystemTypeL();
@@ -151,6 +152,13 @@
RFs& fs = iFramework.Fs();
User::LeaveIfError(fs.Drive(iDriveInfo, driveNo));
User::LeaveIfError(fs.Volume(iVolumeInfo, driveNo));
+
+ const TInt KCDriveNo = 2;
+ if(KCDriveNo == driveNo)
+ {
+ iDriveInfo.iType = EMediaRom;
+ iIsCDrive = ETrue;
+ }
}
/**
@@ -232,6 +240,10 @@
void CMTPGetStorageInfo::SetFreeSpaceInBytesL()
{
TMTPTypeUint64 mtpFreeSpace(iVolumeInfo.iFree);
+ if(iIsCDrive)
+ {
+ mtpFreeSpace.Set(0);
+ }
iStorageInfo->SetL(CMTPTypeStorageInfo::EFreeSpaceInBytes, mtpFreeSpace);
}