Space calculation result is shown for incorrect folder

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
umbra
Power Member
Power Member
Posts: 871
Joined: 2012-01-14, 20:41 UTC

Space calculation result is shown for incorrect folder

Post by *umbra »

1. Have a folder with two subfolders - let's call them "empty" and "full"
2. Make sure the "full" folder has a lot of content in it
3. Navigate in TC so that you can see them in one panel, ordered by name
4. Press space bar on the "full" folder to calculate its size
5. Before the calculation finishes, quickly create another subfolder next to the other two and name it in a way, that it will be shown above them, e.g. "aaa"

The problem:
When the calculation finishes, the size will be shown for the "empty" folder instead of the "full" folder. And the "full" folder will keep the "calculating" icon. Refreshing the panel will fix it, though.

TC , 8.52, 9.12 x86 (x64 not tested)
Windows 7 Pro x64, Windows 10 Pro x64
User avatar
tuska
Power Member
Power Member
Posts: 3741
Joined: 2007-05-21, 12:17 UTC

Re: Space calculation result is shown for incorrect folder

Post by *tuska »

umbra wrote:5. Before the calculation finishes, quickly create another subfolder next to the other two and name it in a way, that it will be shown above them, e.g. "aaa"

The problem:
When the calculation finishes, the size will be shown for the "empty" folder instead of the "full" folder. And the "full" folder will keep the "calculating" icon. Refreshing the panel will fix it, though.
Configuration - Options... - Operation - Calculate space occupied by subdirectories - 'Everything' TICKED could be used at least as workaround.
(Did not test your indicated problem however).
HISTORY.TXT
28.08.17 Release Total Commander 9.10 beta 1 pre 1 (private beta) (32/64)
23.08.17 Added: Configuration - Options - Operation: Option to use "Everything" to get directory sizes via Alt+Shift+Enter and/or spacebar.
Needs recent Everything version with folder size index enabled (32/64)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, not possible. The calculation result is sent to the main program with the position of the folder to be updated. However, normally the calculation is aborted when you change directories or modify the sort order etc.
Author of Total Commander
https://www.ghisler.com
umbra
Power Member
Power Member
Posts: 871
Joined: 2012-01-14, 20:41 UTC

Post by *umbra »

ghisler(Author) wrote:Sorry, not possible.
Not possible to fix or to reproduce? Because I can definitely reproduce it whenever I like.
ghisler(Author) wrote:The calculation result is sent to the main program with the position of the folder to be updated.
That's exactly what I thought. And it explains why this happens.
The mapping between the folder, for which the calculation is run, and its position in the panel is no longer valid when another folder created by another application appears in the panel. Hence, the TC restores the icon and shows the folder size for a different folder with the same index.
ghisler(Author) wrote:However, normally the calculation is aborted when you change directories or modify the sort order etc.
Yes. But I work in environment where some files/folders appear and disappear "on their own". And TC is configured to automatically update panels with filesystem changes.

If there is no way to keep the panel position <-> calculation result mapping valid when panel content refreshes, maybe you could disable panel auto-refresh while space calculation is in progress. It's not like it catches 100% of changes anyway.

Or you could at least use file/folder names in the panel position <-> calculation result mapping. It would not solve all possible issues (e.g. renaming), but at least it would deal with simply added/deleted files/folders.
Windows 7 Pro x64, Windows 10 Pro x64
umbra
Power Member
Power Member
Posts: 871
Joined: 2012-01-14, 20:41 UTC

Post by *umbra »

2tuska
Thanks, but I don't need a workaround. This issue does not really affect me. I know what data I work with and in the rare cases this issue occurs, I can just run the calculation again.
Though, I'm not even sure it would help based on ghisler(Author)'s answer.
Windows 7 Pro x64, Windows 10 Pro x64
User avatar
tuska
Power Member
Power Member
Posts: 3741
Joined: 2007-05-21, 12:17 UTC

Post by *tuska »

umbra wrote:2tuska
Though, I'm not even sure it would help based on ghisler(Author)'s answer.
Using Everything (with folder size index enabled), you usually get the desired result on pressing spacebar =>immediately!,
i.e. you can only create a folder afterwards.
Post Reply