[haiku-bugs] Re: [Haiku] #11809: Tracker: info window: wrong file size (in bytes) for files > 2 GiB (2^31 bytes)

  • From: "korli" <trac@xxxxxxxxxxxx>
  • Date: Fri, 30 Jan 2015 09:04:07 -0000

#11809: Tracker: info window: wrong file size (in bytes) for files > 2 GiB (2^31
bytes)
------------------------------------+----------------------------
   Reporter:  andy-kras             |      Owner:  axeld
       Type:  bug                   |     Status:  new
   Priority:  normal                |  Milestone:  R1/beta1
  Component:  Applications/Tracker  |    Version:  R1/Development
 Resolution:                        |   Keywords:
 Blocked By:                        |   Blocking:
Has a Patch:  0                     |   Platform:  x86
------------------------------------+----------------------------

Comment (by korli):

 in [http://cgit.haiku-
 os.org/haiku/tree/src/kits/tracker/InfoWindow.cpp#n676 InfoWindow.cpp],
 {{{ sizeFormat.Format(result, size); }}} uses the method
 BMessageFormat::Format(BString& output, const int32 arg).
 This obviously can't go past 2GB.

 I would suggest to add a variable-args Format() method like umsg_vformat()
 in the ICU C API, using the pattern to guess the parameter types. Maybe
 wrapping umsg_vformat would be good enough.

--
Ticket URL: <https://dev.haiku-os.org/ticket/11809#comment:1>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: