727 TBool mmcOk = EFalse; |
727 TBool mmcOk = EFalse; |
728 TRAP_IGNORE( mmcOk = !SysUtil::MMCSpaceBelowCriticalLevelL |
728 TRAP_IGNORE( mmcOk = !SysUtil::MMCSpaceBelowCriticalLevelL |
729 ( &fs, bytesToWrite ); ) |
729 ( &fs, bytesToWrite ); ) |
730 if(!mmcOk) |
730 if(!mmcOk) |
731 { |
731 { |
732 iRemovableStatus = TDownloadUiData::EDriveInternal ; |
732 iRemovableStatus = KDriveAttInternal ; |
733 CLOG_WRITE( "no MMC present" ); |
733 CLOG_WRITE( "no MMC present" ); |
734 return EDriveC; |
734 return EDriveC; |
735 } |
735 } |
736 CLOG_WRITE( "MMC is present " ); |
736 CLOG_WRITE( "MMC is present " ); |
737 TVolumeInfo volInfoC; |
737 TVolumeInfo volInfoC; |
738 TVolumeInfo volInfoE; |
738 TVolumeInfo volInfoE; |
739 fs.Volume(volInfoC,EDriveC); |
739 fs.Volume(volInfoC,EDriveC); |
740 fs.Volume(volInfoE,EDriveE); |
740 fs.Volume(volInfoE,EDriveE); |
741 TInt64 freeC = volInfoC.iFree;//free memory available in that drive |
741 TInt64 freeC = volInfoC.iFree;//free memory available in that drive |
742 TInt64 freeE = volInfoE.iFree; |
742 TInt64 freeE = volInfoE.iFree; |
743 freeC>=freeE?EDriveC:EDriveE;//put the file in which ever drive has more memory |
743 freeC = freeE?EDriveC:EDriveE;//put the file in which ever drive has more memory |
744 iRemovableStatus = (EDriveC == freeC) ? TDownloadUiData::EDriveInternal : ( TDownloadUiData::EDriveExternallyMountable | TDownloadUiData::EDriveRemovable ) ; |
744 iRemovableStatus = (EDriveC == freeC) ? KDriveAttInternal : KDriveAttRemovable ; |
745 return freeC; |
745 return freeC; |
746 #endif |
746 #endif |
747 } |
747 } |
748 |
748 |
749 // Destination is FFS in default |
749 // Destination is FFS in default |
859 TDriveInfo driveInfo; |
859 TDriveInfo driveInfo; |
860 |
860 |
861 if( !iDownload->ClientApp()->Engine()->Fs().Drive( driveInfo, drive) ) |
861 if( !iDownload->ClientApp()->Engine()->Fs().Drive( driveInfo, drive) ) |
862 { |
862 { |
863 if (driveInfo.iDriveAtt & KDriveAttRemovable) |
863 if (driveInfo.iDriveAtt & KDriveAttRemovable) |
864 iRemovableStatus = ( TDownloadUiData::EDriveExternallyMountable | TDownloadUiData::EDriveRemovable ) ; |
864 iRemovableStatus = KDriveAttRemovable ; |
865 else |
865 else |
866 iRemovableStatus = TDownloadUiData::EDriveInternal ; |
866 iRemovableStatus = KDriveAttInternal ; |
867 CLOG_WRITE_1( "Removable: [%d]", iRemovableStatus ); |
867 CLOG_WRITE_1( "Removable: [%d]", iRemovableStatus ); |
868 } |
868 } |
869 else |
869 else |
870 { |
870 { |
871 CLOG_WRITE("DriveInfo failed"); |
871 CLOG_WRITE("DriveInfo failed"); |
1070 TDriveInfo driveInfo; |
1070 TDriveInfo driveInfo; |
1071 |
1071 |
1072 if( !iDownload->ClientApp()->Engine()->Fs().Drive( driveInfo, drive) ) |
1072 if( !iDownload->ClientApp()->Engine()->Fs().Drive( driveInfo, drive) ) |
1073 { |
1073 { |
1074 if (driveInfo.iDriveAtt & KDriveAttRemovable) |
1074 if (driveInfo.iDriveAtt & KDriveAttRemovable) |
1075 iRemovableStatus = ( TDownloadUiData::EDriveExternallyMountable | TDownloadUiData::EDriveRemovable ) ; |
1075 iRemovableStatus = KDriveAttRemovable ; |
1076 else |
1076 else |
1077 iRemovableStatus = TDownloadUiData::EDriveInternal ; |
1077 iRemovableStatus = KDriveAttInternal ; |
1078 CLOG_WRITE_1( "Removable: [%d]", iRemovableStatus ); |
1078 CLOG_WRITE_1( "Removable: [%d]", iRemovableStatus ); |
1079 } |
1079 } |
1080 else |
1080 else |
1081 { |
1081 { |
1082 CLOG_WRITE("DriveInfo failed"); |
1082 CLOG_WRITE("DriveInfo failed"); |