Changeset 5771 for trunk


Ignore:
Timestamp:
2003-11-03T12:57:13+13:00 (20 years ago)
Author:
mdewsnip
Message:

Fix to bug 185: decimal places aren't necessary for file sizes measured in bytes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/util/Utility.java

    r5759 r5771  
    354354    }
    355355    else {
    356         number = (float) length;
    357         suffix = BYTE_SUFFIX;
     356        // Don't need to do anything fancy if the file is smaller than a kilobyte
     357        return length + BYTE_SUFFIX;
    358358    }
    359359    // Create the formatted string remembering to round the number to 2.d.p. To do this copy everything in the number string from the start to the first occurance of '.' then copy two more digits. Finally search for and print anything that appears after (and including) the optional 'E' delimter.
Note: See TracChangeset for help on using the changeset viewer.