mirror of
https://github.com/nachoparker/dutree
synced 2024-04-27 04:05:02 +02:00
Increase integer size to store 1024^4. Fixes #13
Signed-off-by: nachoparker <nacho@ownyourbits.com>
This commit is contained in:
parent
6352bc66ae
commit
72344f2780
|
@ -15,7 +15,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "dutree"
|
||||
version = "0.2.12"
|
||||
version = "0.2.13"
|
||||
dependencies = [
|
||||
"getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "dutree"
|
||||
version = "0.2.12"
|
||||
version = "0.2.13"
|
||||
authors = ["nacho <nacho@ownyourbits.com>"]
|
||||
description = "Command line tool to analyze disk usage"
|
||||
repository = "https://github.com/nachoparker/dutree"
|
||||
|
|
|
@ -460,7 +460,7 @@ fn fmt_size_str( bytes : u64, flag : bool ) -> String {
|
|||
else if bytes < 1024u64.pow(2) { format!( "{:.2} KiB", b/1024.0 ) }
|
||||
else if bytes < 1024u64.pow(3) { format!( "{:.2} MiB", b/(1024u32.pow(2) as f32)) }
|
||||
else if bytes < 1024u64.pow(4) { format!( "{:.2} GiB", b/(1024u32.pow(3) as f32)) }
|
||||
else { format!( "{:.2} TiB", b/(1024u32.pow(4) as f32)) }
|
||||
else { format!( "{:.2} TiB", b/(1024u64.pow(4) as f32)) }
|
||||
}
|
||||
|
||||
fn get_bytes( path: &Path, usage_flag : bool ) -> u64 {
|
||||
|
|
Loading…
Reference in New Issue