Subject: | Negative File sizes for sizes bigger than signed integer |
Date: | Thu, 30 Jul 2015 15:37:04 +0200 |
To: | bug-File-Size [...] rt.cpan.org |
From: | Riaan Olivier <riaan.olivier [...] striata.com> |
Found that if you use this package to get the size on directories that are
bigger than 3G it gives you negative values back.
The issue is that the sprintf in the getsize function contains a %d for
signed integers, if it can be changed to %u for unsigned integers it will
show the correct number.
*Suggested Change*
From:
* return $$self{ 'humanreadable' } ? format_bytes( $size ) : sprintf( '%d',
$size / $blocksize );*
To:
* return $$self{ 'humanreadable' } ? format_bytes( $size ) : sprintf( '%u',
$size / $blocksize );*
Thanks
Riaan Olviier