forked from hardcoresushi/DroidFS
Fix size formatting
This commit is contained in:
parent
bd4c935c4c
commit
7ca9398766
@ -89,8 +89,8 @@ object PathUtils {
|
||||
if (size <= 0) {
|
||||
return "0 B"
|
||||
}
|
||||
val digitGroups = (log10(size.toDouble()) / log10(1024.0)).toInt()
|
||||
return DecimalFormat("#,##0.#").format(size / 1024.0.pow(digitGroups.toDouble())
|
||||
val digitGroups = (log10(size.toDouble()) / log10(1000.0)).toInt()
|
||||
return DecimalFormat("#,##0.#").format(size / 1000.0.pow(digitGroups.toDouble())
|
||||
) + " " + units[digitGroups]
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user