userlibandfileserver/fileserver/sfat32/sl_mnt32.cpp
changeset 266 0008ccd16016
parent 247 d8d70de2bd36
equal deleted inserted replaced
259:57b9594f5772 266:0008ccd16016
  1065         if (pos<(clusterListLen<<ClusterSizeLog2()))
  1065         if (pos<(clusterListLen<<ClusterSizeLog2()))
  1066             {
  1066             {
  1067 			//  Read the remaining length or the entire cluster block whichever is smaller
  1067 			//  Read the remaining length or the entire cluster block whichever is smaller
  1068 			TInt readLength = (TInt)Min((TInt64)(aLength-readTotal),(clusterListLen<<ClusterSizeLog2())-pos);
  1068 			TInt readLength = (TInt)Min((TInt64)(aLength-readTotal),(clusterListLen<<ClusterSizeLog2())-pos);
  1069 			__ASSERT_DEBUG(readLength>0,Fault(EReadFileSectionFailed));
  1069 			__ASSERT_DEBUG(readLength>0,Fault(EReadFileSectionFailed));
  1070 			TInt64 dataAddress=(FAT().DataPositionInBytes(cluster))+pos;
  1070 			TInt64 dataAddress=(FAT().DataPositionInBytesL(cluster))+pos;
  1071 			iRawDisk->ReadL(dataAddress,readLength,aTrg,aMessage,readTotal, 0);
  1071 			iRawDisk->ReadL(dataAddress,readLength,aTrg,aMessage,readTotal, 0);
  1072 			readTotal += readLength;
  1072 			readTotal += readLength;
  1073 
  1073 
  1074 			if (readTotal == aLength)
  1074 			if (readTotal == aLength)
  1075 				return;
  1075 				return;