Page 1 of 1

internal associations lost when ticking/unticking "Load extra commands from all matching types"

Posted: 2020-03-25, 14:57 UTC
by billiebub
Internal Associations comes with the option to "Load extra commands from all matching types". I select this option when I have an undefined extension so typically I have a *.* in Wincmd.ini. Ticking this option then unticking it will cause TC to delete command entries for *.* as an example.

Here is how to produce the issue:

1- Create a *.* internal association
2- Add 3 or 4 commands to it
3- In Internal Association window, check the "Load extra commands from all matching types"
4- In Internal Association window, uncheck the "Load extra commands from all matching types"
5- Open wincmd.ini, and scroll to the bottom of the file or to where *.* commands are stored in the file. You should see some of the commands (if not all) are deleted.

Re: internal associations lost when ticking/unticking "Load extra commands from all matching types"

Posted: 2020-03-25, 15:21 UTC
by ghisler(Author)
NOT confirmed. Changing this option only changes AssociationMultiVerbs=1/0 in the [Configuration] section, it doesn't touch the [Associations] section.

Maybe I misunderstood you? Did you close the dialog between steps 2 and 3 and steps 3 and 4?

Here is what I tried (both with 32-bit and 64-bit):
1. Start TC with fresh wincmd.ini
2. Files - internal associations
3. Add...
4. Entered: *.* and clicked OK
5. New...
6. Entered aaa and aaa.exe
7. New...
8. Entered bbb and bbb.exe
9. New...
10. Entered aaa and aaa.exe
11. New...
12. Entered bbb and bbb.exe
13. OK
14. Only in test 1 and 2: Closed internal associations with OK, and re-opened them
15. Checked "Load extra commands from all matching types
16. Only in test 1: Closed internal associations with OK, and re-opened them
17. Unhecked "Load extra commands from all matching types
18. Closed internal associations with OK, and re-opened them

In all 3 tests, the [Configuration] section contains all the commands.
What are you doing differently?

Re: internal associations lost when ticking/unticking "Load extra commands from all matching types"

Posted: 2020-03-25, 15:54 UTC
by billiebub
First, I'm using TC 9.51 RC6. I just reproduced it. Make sure to have prior extensions defined such as *.jpeg, etc. Try to have *.* as the last entry in the Internal Assocations and see if that makes a difference.

Re: internal associations lost when ticking/unticking "Load extra commands from all matching types"

Posted: 2020-03-25, 15:58 UTC
by ghisler(Author)
Can you post your [Associations] section, please? This would help me reproduce your problem.

Also please let me know when I need to close and re-open the dialog (step 14 and 16 yes or no).

Edit: Tried with my own list of 47 internal associations, no problem. I couldn't find any problems in my code either.
The only problem I know of is the size limit of each ini section (64kBytes). If this is reached, associations at the end may not be saved.

Re: internal associations lost when ticking/unticking "Load extra commands from all matching types"

Posted: 2020-03-25, 17:14 UTC
by billiebub
OK. I tried your steps and cannot reproduce and it's not easy to reproduce so please use the instructions below as it worked for me:

1- Open wincmd.ini
2- Scroll down to end of [Associations]
3- Add these entries (change entry numbers if necessary)
Filter59=*.aaa
Filter59_aaa=aaa.exe
Filter59_bbb=bbb.exe
Filter59_ccc=ccc.exe
Filter59_ddd=ddd.exe
Filter59_eee=eee.exe
Filter60=*.bbb
Filter60_aaa=aaa.exe
Filter60_bbb=bbb.exe
Filter60_ccc=ccc.exe
Filter60_ddd=ddd.exe
Filter61=*.*
Filter61_aaa=aaa.exe
Filter61_bbb=bbb.exe
Filter61_ccc=ccc.exe
Filter61_ddd=ddd.exe
Filter61_eee=eee.exe
Filter61_fff=ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff.exe

4- Open Internal Associations window
5- Check/uncheck the "Load extra commands from all matching types". We just care to refersh Wincmd.ini
6- Check the last command entry in wincmd.ini *.*. TC will delete the "Filter61_fff=ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff.exe"

Re: internal associations lost when ticking/unticking "Load extra commands from all matching types"

Posted: 2020-03-25, 17:37 UTC
by ghisler(Author)
Not confirmed - I guess that it's exactly as I suspected: Your [Associations] section would become larger than 64kBytes, so it is cut when rewriting it.

Re: internal associations lost when ticking/unticking "Load extra commands from all matching types"

Posted: 2020-03-25, 18:06 UTC
by billiebub
I saw your email. I don't feel comfortable sharing my associations as first it's huge and contains sensitive information. Hopefully there is a fix for this as I have a seperate file that contains my associations in case I lose them. I just have to make sure I don't mess with associations that much.

Re: internal associations lost when ticking/unticking "Load extra commands from all matching types"

Posted: 2020-03-25, 20:55 UTC
by ghisler(Author)
Could you please copy your [Associations] section to a separate file and check how big it is? I also wonder whether your wincmd.ini is ANSI or Unicode (UTF-16).

Re: internal associations lost when ticking/unticking "Load extra commands from all matching types"

Posted: 2020-03-26, 01:50 UTC
by billiebub
[Associations] section is 67204 bytes. File is ANSI

Re: internal associations lost when ticking/unticking "Load extra commands from all matching types"

Posted: 2020-03-26, 08:26 UTC
by ghisler(Author)
That's what I suspected - it's too big. What you can do is shorten the verbs, e.g. via search+replace if you use the same verb in many associations. The goal is to bring it below 65535 bytes, the maximum supported per section in ini files.

You could also replace very long paths with their 8.3 name equivalents. You can quickly switch between short and long names in Total Commander with the command cm_switchlongnames in the command line, on a button, or in the start menu.

Re: internal associations lost when ticking/unticking "Load extra commands from all matching types"

Posted: 2020-03-26, 13:06 UTC
by billiebub
Also, before the introduction of "Load extra commands from all matching types", there was a lot of copy and paste of similar commands across many extensions. For example, encrypting files. With this option, I can remove the duplicates and add a *.* section of all commands that apply to all extensions.