Opened 10 years ago
Closed 10 years ago
#11809 closed bug (fixed)
Tracker: info window: wrong file size (in bytes) for files > 2 GiB (2^31 bytes)
Reported by: | andy-kras | Owned by: | pulkomandy |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta1 |
Component: | Applications/Tracker | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | x86 |
Description
Tracker -> "Get Info" show wrong file size (in bytes) for file sizes more than 2 GiB.
You can see it for file /boot/system/var/swap, for example.
Just set virtual memory size 2.01 Gib and reboot.
Then get file info in Tracker and see negative file size (-2,140,143,616 bytes).
Tested on last nightly hrev48745 x86_gcc2_hybrid and hrev48744 x86_64
Attachments (1)
Change History (4)
by , 10 years ago
Attachment: | screenshot1.png added |
---|
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Note:
See TracTickets
for help on using tickets.
in 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.