int comp_num = 0;
int reorder_comp_num = 0;
for (int iIndex = 0; iIndex < fileInfos.length; iIndex++)
{
DiskManagerFileInfo fileInfo = fileInfos[iIndex];
if (iIndex >= 0 && iIndex < files.length && files[iIndex].lSize == fileInfo.getLength())
{
// Always pull destination file from fileInfo and not from
// TorrentFileInfo because the destination may have changed
// by magic code elsewhere
File fDest = fileInfo.getFile(true);
if (files[iIndex].isLinked()){
fDest = files[iIndex].getDestFileFullName();
// Can't use fileInfo.setLink(fDest) as it renames
// the existing file if there is one
dm.getDownloadState().setFileLink( fileInfo.getFile(false), fDest);
}
if (!files[iIndex].bDownload){
toSkip[iIndex] = true;
if (!fDest.exists()){
if ( reorder_mode && ( fileInfo.getLength()/(1024*1024)) >= reorder_mode_min_mb ){
toReorderCompact[iIndex] = true;
reorder_comp_num++;