- (if (memq ?s switches) ; size in K
- (format ls-lisp-filesize-f-fmt
- (fceiling (/ file-size 1024.0))))
+ (if (memq ?s switches) ; size in K, rounded up
+ ;; In GNU ls, -h affects the size in blocks, displayed
+ ;; by -s, as well.
+ (if (memq ?h switches)
+ (format "%6s "
+ (file-size-human-readable
+ ;; We use 1K as "block size", although
+ ;; most Windows volumes use 4KB to 8KB
+ ;; clusters, and exFAT will usually have
+ ;; clusters of 32KB or even 128KB. See
+ ;; KB article 140365 for the details.
+ (* 1024.0 (fceiling (/ file-size 1024.0)))))
+ (format ls-lisp-filesize-b-fmt
+ (fceiling (/ file-size 1024.0)))))