[TC851a] Secondary sort by name doesn't work for directories

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

[TC851a] Secondary sort by name doesn't work for directories

Post by *HolgerK »

wincmd.ini wrote:[Configuration]
SortDirsByName=0
- <Left click> on "Ext" tabstop header
- <Ctrl>+<Left click> on "Name" tabstop header
- <Ctrl>+<Left click> on "Name" tabstop header to invert the secondary sort order

-> the files are re-sorted
-> the directories keep their previous sort order

Regards
Holger
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3864
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

-> the directories keep their previous sort order
Well, this is exactly what you told TC to do !
SortDirsByName=0
#5767 Personal license
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

F1 wrote:SortDirsByName=1 Always sort directories by name
->SortDirsByName=0 means that sorting by "Name" tabstop header has not only an effect for files but also for directories.

Regards
Holger
User avatar
petermad
Power Member
Power Member
Posts: 14807
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

I can confirm HolgerK's observation and would characterize it as a bug.
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

By default, directories are NOT sorted by extension. However, you can re-enable it manually.

Please add the following strings to the file wincmd.ini, section [Configuration]:
SortDirExt=1
SortDirsByName=0

You can edit the wincmd.ini via Configuration - Change settings files directly.
Author of Total Commander
https://www.ghisler.com
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

Even with "SortDirExt=1" (*) the secondary sort by name does not work for directories.

Regards
Holger

(*)SortDirsByName=0 was already set.
User avatar
petermad
Power Member
Power Member
Posts: 14807
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

SortDirExt=1
I always have that setting active - and I can still confirm Holger's observation.
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I have just checked the code - additional sort columns are only supported for files, not folders. I'm not sure whether I should change that or not now after so many years...
Author of Total Commander
https://www.ghisler.com
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

I would fix it.
The strange thing is that even with the default "SortDirExt=0" the directories are sorted by the sort order of the extension:
^2 Name | v Ext
[..]
[Dir_B2.2]
[Dir_B2.1]
[Dir_B1.2]
[Dir_B1.1]
[Dir_A2.2]
[Dir_A2.1]
[Dir_A1.2]
[Dir_A1.1]
file__A1.2
file__A2.2
file__B1.2
file__B2.2
file__A1.1
file__A2.1
file__B1.1
file__B2.1
For me this is clearly a buggy, unexpected behavior.
I don't think that anyone can categorize this as a feature.

Regards
Holger
User avatar
petermad
Power Member
Power Member
Posts: 14807
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

I would fix it.
I agree.
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

Histroy.txt wrote:16.09.14 Fixed: Secondary sort orders (e.g. by date, then by name) didn't work for directories (32/64)
I can confirm the fix in TC9.0.B1 x86/x64.

Thanks
Holger
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks!
Author of Total Commander
https://www.ghisler.com
Post Reply