901 { |
901 { |
902 CDesCArray* usbLetterName = new ( ELeave ) CDesCArrayFlat( KDriveNameArrayLen ); |
902 CDesCArray* usbLetterName = new ( ELeave ) CDesCArrayFlat( KDriveNameArrayLen ); |
903 CleanupStack::PushL( usbLetterName ); |
903 CleanupStack::PushL( usbLetterName ); |
904 |
904 |
905 TPtrC16 driveletter=array->MdcaPoint( KDriveLetterIndex ); |
905 TPtrC16 driveletter=array->MdcaPoint( KDriveLetterIndex ); |
906 usbLetterName->AppendL( driveletter ); |
906 usbLetterName->AppendL( driveletter ); |
907 |
907 HBufC* usbDriveDefaultName = NULL; |
908 if(array->MdcaCount() > 1 ) |
908 if(array->MdcaCount() > 1 ) |
909 { |
909 { |
910 TPtrC16 drivename=array->MdcaPoint( KDriveNameIndex ); |
910 TPtrC16 drivename=array->MdcaPoint( KDriveNameIndex ); |
911 usbLetterName->AppendL( drivename ); |
911 usbLetterName->AppendL( drivename ); |
912 } |
912 } |
913 else |
913 else |
914 { |
914 { |
915 TPtrC16 drivename=_L(""); |
915 usbDriveDefaultName = StringLoader::LoadLC( R_QTN_FMGR_USB_MEMORY_DEFAULT_NAME ); |
916 usbLetterName->AppendL( drivename ); |
916 TPtrC16 drivename = usbDriveDefaultName->Des(); |
|
917 usbLetterName->AppendL( drivename ); |
917 } |
918 } |
918 |
919 |
919 |
920 |
920 ret = StringLoader::LoadL( |
921 ret = StringLoader::LoadL( |
921 aTextIdForDefaultName,*usbLetterName ); |
922 aTextIdForDefaultName,*usbLetterName ); |
922 |
923 |
923 CleanupStack::PopAndDestroy( usbLetterName ); |
924 CleanupStack::PopAndDestroy( usbLetterName ); |
924 } |
925 if ( usbDriveDefaultName ) |
925 else |
926 { |
926 { |
927 CleanupStack::PopAndDestroy( usbDriveDefaultName ); |
927 ret = StringLoader::LoadL(aTextIdForDefaultName, array->MdcaPoint( |
928 } |
|
929 } |
|
930 else |
|
931 { |
|
932 ret = StringLoader::LoadL(aTextIdForDefaultName, array->MdcaPoint( |
928 KDriveLetterIndex)); |
933 KDriveLetterIndex)); |
929 } |
934 } |
930 } |
935 } |
931 else if ( array->MdcaCount() > 1 ) |
936 else if ( array->MdcaCount() > 1 ) |
932 { |
937 { |