diff options
Diffstat (limited to 'lisp/files.el')
-rw-r--r-- | lisp/files.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el index fd241041b74..5b29f3790e8 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1162,7 +1162,10 @@ Optional second argument FLAVOR controls the units and the display format: (while (and (>= file-size power) (cdr post-fixes)) (setq file-size (/ file-size power) post-fixes (cdr post-fixes))) - (format "%.0f%s%s" file-size + (format (if (> (mod file-size 1.0) 0.05) + "%.1f%s%s" + "%.0f%s%s") + file-size (if (and (eq flavor 'iec) (string= (car post-fixes) "k")) "K" (car post-fixes)) |