From: Kevin McCarthy Date: Sun, 3 Jun 2018 21:52:37 +0000 (-0700) Subject: Revert showing real size for small files in mutt_pretty_size(). X-Git-Tag: mutt-1-10-1-rel~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cb2329ae2fecd14c30a381196f9b9ab015bdb1f0;p=mutt Revert showing real size for small files in mutt_pretty_size(). I thought the change made in 0fa64ba9 was small enough not to matter, but at least one long-time user took the time to track down the change and request it be reverted. --- diff --git a/muttlib.c b/muttlib.c index 7d280cd1..39f5754a 100644 --- a/muttlib.c +++ b/muttlib.c @@ -902,8 +902,12 @@ void mutt_pretty_mailbox (char *s, size_t buflen) void mutt_pretty_size (char *s, size_t len, LOFF_T n) { - if (n < 1000) - snprintf (s, len, "%d", (int)n); + if (n == 0) + strfcpy (s, "0K", len); + /* Change in format released in 1.10.0, but reverted after feedback: + * if (n < 1000) + * snprintf (s, len, "%d", (int)n); + */ else if (n < 10189) /* 0.1K - 9.9K */ snprintf (s, len, "%3.1fK", (n < 103) ? 0.1 : n / 1024.0); else if (n < 1023949) /* 10K - 999K */