Ignore:
Timestamp:
2008-06-09T14:34:46+12:00 (14 years ago)
Author:
anna
Message:

The old method for checking free disk space overflows (returns a negative number) when the physical free disk space is bigger than 4G. So instead of comparing by byte, now we compare by K. The return type is also changed, from unsigned long to double.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/trunk/gsinstaller/fileCopier.cpp

    r11664 r15927  
    216216}
    217217
    218 unsigned long fileCopySet::getCopiedSize(DiskSpace &space)
     218unsigned double fileCopySet::getCopiedSize(DiskSpace &space)
    219219{
    220220  // initialise counters for size
     
    229229      here ++;
    230230    }
    231   return copiedSize;
     231  return (double) copiedSize / (double) 1024;
    232232}
    233233
     
    303303      if (space.totalFreeSpace() < copiedSize)
    304304    {
     305      char buffer[100];
     306      sprintf(buffer, "Total free space on disk %3.1fMb, but the size of the copied collection is %3.1fMb", (double) space.totalFreeSpace() / (double) (1024), (double) copiedSize / (double) (1024));       
     307      MessageBox(0, buffer, "Greenstone Installer", MB_OK);
     308
    305309      return false;
    306310    }
Note: See TracChangeset for help on using the changeset viewer.