Ticket #4523 (new defect)

Opened 11 months ago

Last modified 11 months ago

Still issues with unit prefixes (related to 3666)

Reported by: lmarcantonio Owned by:
Priority: trivial Milestone: Future Releases
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

In mc 4.8.30

The SI/IEC suffixes for sizes still have issues. In particular:

size_trunc() is correct, uses kB/KiB (yes, the K is upper case, as it should), MB/MiB and so on.

size_trunc_len() however is completely wrong since it simply uses the lowercase letters (for the SI units!) in the static suffix_lc array. So you get a SI mB (milli byte!) and an IEC KB (which is wrong).

It's a nitpick but since there is a SI/IEC switch it would be better to use the right units.

Attachments

si-iec-units.diff (808 bytes) - added by lmarcantonio 11 months ago.
Proposed patch

Change History

Changed 11 months ago by lmarcantonio

Proposed patch

comment:1 Changed 11 months ago by zaytsev

The ticket #3666 was never resolved properly. See the latest comments and in particular the attempt by andrew_b, which was not merged, because nobody got to test and review it:

Also, there are many related tickets:

  • #3673 - Deprecate size_trunc_sep() in favor of locale-dependent printf support
  • #3674 - Add new panel option for display_total_marked_size() to apply three different styles
  • #3675 - Update/rework panel option "Use SI size units"
  • #3676 - Reconsider wether the info panel should show a scaled or raw value for file size

If you want to work on this topic, I would suggest to look at the existing tickets and explain which parts your patch can resolve, what can and should be resolved, and what not. Otherwise this will be just yet another ticket on this topic, which doesn't bring us closer to resolving it properly :(

Note: See TracTickets for help on using tickets.