userlibandfileserver/fileserver/sfat32/sl_mnt32.cpp
changeset 254 1560c419b176
parent 199 189ece41fa29
child 291 206a6eaaeb71
equal deleted inserted replaced
253:d37db4dcc88d 254:1560c419b176
  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;