WFX: Wrong large files size in feed to listbox results

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
D1P
Senior Member
Senior Member
Posts: 233
Joined: 2005-02-28, 18:29 UTC
Location: Moscow
Contact:

WFX: Wrong large files size in feed to listbox results

Post by *D1P »

This reproduced in TC 9.0a, x32/x64 versions both + any FS-plugin, where search is available. I used VirtualPanel for example.
1. You just need to place any file bigger than 4294967295 bytes (i.e. 0xFFFFFFFF) in plugin filesystem. File size displayed correctly, as expected.
2. Start a search in plugin filesystem without any parameters, wait until it finishes, and press "Feed to listbox". We got wrong file size for same file!

So it seems that TC in that case ignores nFileSizeHigh field in _WIN32_FIND_DATA struct, that returned in FsFindFirst/FsFindNext API functions: actual file size is 4573762603 bytes, TC display it as 278795307 bytes, so 4573762603-278795307=4294967296 => 0xFFFFFFFF + 1.
But it is not all: if repeat these with file bigger than 6442450943 bytes (0xFFFFFFFF*1.5 + 1), TC will display negative file size result!
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Confirmed!

Status bar in search results shows focused file sizes as 32-bit signed values (so e.g. 3074111488 is shown as -1-220-855-808 Bytes or -1192242 KBytes), and it adds these values to total size as 32-bit signed values too (total size decreases). If I switch to full view mode, I see correct sizes in size column. It may be reproduced when there are files larger than 2 GB, total size of smaller files is shown correctly even if it is larger than 4 GB.

Tested on TC 9.0a x86 under Win7x64 with Virtual Panel and SFTP4TC.
User avatar
D1P
Senior Member
Senior Member
Posts: 233
Joined: 2005-02-28, 18:29 UTC
Location: Moscow
Contact:

Post by *D1P »

Seems to be fixed in TC9.10b1.
Post Reply