[implemented] Show empty dirsize as 0 and not <DIR>

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

[implemented] Show empty dirsize as 0 and not <DIR>

Post by *petermad »

When dirsize calculation is evoked (Shift+Alt+Enter or cm_CountDirContent) then I suggest to show the size of empty dirs as 0 in stead of <DIR> so it is visible that the dirsize for the folder has been calculated.

Maye show 0 when there is nothing in the dir and show -0 or (0) when there are only empty directories and/or zero-length files in the dir.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately this isn't possible - TC stores default value as 0, which is displayed as <dir>.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Then when the result of cm_CountDirContent for a dir results in 0, display something else than 0 and <DIR>.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

I guess many users who don't use the DirSizeCalc plugin would appreciate a similar solution:

- After calculation show more details for 0 byte size folders: No files (just subfolders), 0 byte files only oder really empty.
- Distinguish different types of reparse points
- Maybe even inform the user about side effects of the calculation (things like folder contains junctions for which the size wasn't calculated).
User avatar
Guillaume
Junior Member
Junior Member
Posts: 90
Joined: 2003-04-08, 16:51 UTC

Post by *Guillaume »

ghisler(Author) wrote:Unfortunately this isn't possible - TC stores default value as 0, which is displayed as <dir>.
So, default value -1?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

In principle, yes - but the size is used in various places, e.g. to calculate the total size, and I fear that I will forget the one or other location and get wrong values...
Author of Total Commander
https://www.ghisler.com
User avatar
Guillaume
Junior Member
Junior Member
Posts: 90
Joined: 2003-04-08, 16:51 UTC

Post by *Guillaume »

Maybe it's less of a hassle the other way around: -1 only for dir size calculation, which will present "0" instead of "<dir>"? It's a workaround, but it does save you trouble and it saves people the trouble of thinking "have I pressed space on this directory already and deselected it afterwards, or not?" (apart from the feedback on Alt+Shift+Enter as OP stated).
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Show empty dirsize as 0 and not <DIR>

Post by *petermad »

Bump*
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply