Ignore:
Timestamp:
2008-06-09T14:34:46+12:00 (16 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/DiskSpace.cpp

    r11664 r15927  
    5454}
    5555
    56 unsigned long DiskSpace::totalFreeSpace()
    57 { return this->freeClusters * this->sectorsPerCluster * this->bytesPerSector;
     56unsigned double DiskSpace::totalFreeSpace()
     57{   return this->freeClusters * (((double) (this->sectorsPerCluster * this->bytesPerSector)) / (double) (1024));
    5858}
    5959
Note: See TracChangeset for help on using the changeset viewer.