diff --git a/app/src/main/java/sushi/hardcore/droidfs/util/PathUtils.kt b/app/src/main/java/sushi/hardcore/droidfs/util/PathUtils.kt index b893989..4379fa6 100644 --- a/app/src/main/java/sushi/hardcore/droidfs/util/PathUtils.kt +++ b/app/src/main/java/sushi/hardcore/droidfs/util/PathUtils.kt @@ -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] }