Content plug-in API ContentGetValue doesn't set value always

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Content plug-in API ContentGetValue doesn't set value always

Post by *Lefteous »

When ContentGetValue is called with flags set to 2 and a directory as filename the value is always set to 0.
Expected: The size of the directory should be passed.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48097
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, this is intentional. It would be too slow to retrieve the directory size just for plugin calls. It would also be inconsistant if the size is passed to the plugin only when known.
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2ghisler(Author)
Well directory size in an archive is fast to calculate as the file sizes are stored in a cache as TC calls ReadHeader until it returns no more files. For FTP directory sizes are not supported at all so I don't request them - just for archives and filesystem plugins please :)
Post Reply