Skip Menu |

This queue is for tickets about the File-Size CPAN distribution.

Report information
The Basics
Id: 106155
Status: new
Priority: 0/
Queue: File-Size

People
Owner: Nobody in particular
Requestors: riaan.olivier [...] striata.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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