diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/App/Hashl.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/App/Hashl.pm b/lib/App/Hashl.pm index f17f771..f0a93ce 100644 --- a/lib/App/Hashl.pm +++ b/lib/App/Hashl.pm @@ -40,6 +40,10 @@ sub si_size { my ( $self, $bytes ) = @_; my @post = ( q{ }, qw(k M G T) ); + if ($bytes == 0) { + return 'infinite'; + } + while ( $bytes >= 1024 ) { $bytes /= 1024; shift @post; |