-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hotfix - didn't show filesize if size exact 1KB, 1MB, etc.
- Loading branch information
Showing
1 changed file
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -125,22 +125,22 @@ impl FileData { | |
fsize.push("-".to_string()); | ||
} else { | ||
match filesize { | ||
s if s > TB => { | ||
s if s >= TB => { | ||
let size = ((filesize as f64 / TB as f64) * 10.0).round() / 10.0; | ||
fsize.push(size.to_string()); | ||
fsize.push("T".to_string()); | ||
} | ||
s if s > GB && s < TB => { | ||
s if s >= GB && s < TB => { | ||
let size = ((filesize as f64 / GB as f64) * 10.0).round() / 10.0; | ||
fsize.push(size.to_string()); | ||
fsize.push("G".to_string()); | ||
} | ||
s if s > MB && s < GB => { | ||
s if s >= MB && s < GB => { | ||
let size = ((filesize as f64 / MB as f64) * 10.0).round() / 10.0; | ||
fsize.push(size.to_string()); | ||
fsize.push("M".to_string()); | ||
} | ||
s if s > KB && s < MB => { | ||
s if s >= KB && s < MB => { | ||
let size = ((filesize as f64 / KB as f64) * 10.0).round() / 10.0; | ||
fsize.push(size.to_string()); | ||
fsize.push("K".to_string()); | ||
|
@@ -351,7 +351,7 @@ fn sl() -> Command { | |
)) | ||
.about("List directory entries") | ||
// TODO update version | ||
.version("1.1.7") | ||
.version("1.1.8") | ||
.author("Leann Phydon <[email protected]>") | ||
.arg( | ||
Arg::new("colour") | ||
|