7.5 pb2: incorrect association breaks whole system

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

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

7.5 pb2: incorrect association breaks whole system

Post by *m^2 »

1. Create a wincmd.ini like this:

Code: Select all

[configuration]
UseIniInProgramDir=7
FirstTime=0
[Associations]
Filter1=>wrong_search
Filter1_open=some_command
Filter2=*.txt
Filter2_open=notepad "%1"
Filter2.icon="%COMMANDER_PATH%\TOTALCMD.EXE"
2. Go to a directory containing a text file.
It should have a TC icon, while TC loads a system one.

In general, all associations after a broken one don't work. I think that TC should failover and continue searching. Maybe show a warning.
It works well with colouring.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

What does "wrong_search" contain? If it matches, TC uses its settings, and if no icon is defined, TC uses system icon...
Author of Total Commander
https://www.ghisler.com
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

Nothing. What I posted above is whole wincmd.ini.
It's very possible that incorrect search matches everything. (EDIT: no, see below)
I found it by deleting a "_tmp" search from my wincmd.ini (something created for testing purposes) and finding that associations don't work at all.

ADDED: when I add
Filter1.icon="%COMMANDER_PATH%\TOTALCMD.EXE"
strange things happen:
Filter1 doesn't match any file. But filter2 works again.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Strange, I will check that.
Author of Total Commander
https://www.ghisler.com
User avatar
karlchen
Power Member
Power Member
Posts: 4605
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hi, m^2, hi, Christian.

I am not quote sure that I created the broken association the right way. Here is my [Associations] section (T.C. 7.50 PB3 wincmd.ini):
[Associations]
Filter1=>wrong_search
Filter1_open="notepad.exe "%1""
Filter2=>PDFFiles
Filter2_open=""%COMMANDER_PATH%\..\PDFReader\Foxit Reader.exe" "%1""
Filter2.icon=%COMMANDER_PATH%\..\PDFReader\Foxit Reader.exe,1
Filter3=>PlainTextFiles
Filter3_open=""%COMMANDER_PATH%\..\PFE\PFE32.EXE" "%1""
Filter3.icon=%COMMANDER_PATH%\..\PFE\PFE32.EXE,4
>wrong_search simply does not exist, i.e. there is no entry in the [searches] section named >wrong_search.
The associations defined for >PDFFiles and >PlainTextFiles work as expected.

Does this suggest that an issue has been fixed or that I have not been able to reproduce it because I tried it in the wrong way?

<Added a few minutes later (brain switched on by now)>
OK, found the answer myself by putting the same [Associations] section inside the wincmd.ini of T.C. 7.50 PB2. :lol:
Now the associations defined for >PDFFiles and >PlainTextFiles do not correctly work any longer:
+ >PlainTextFiles will be processed by FoxitReader which cannot read them
+ >PDFFiles will be opened by Notepad which does not make too much sense, either.
</Added a few minutes later>

T.C. 7.50 PB3, however, seems to ignore the broken association and interprets the remaining two correct associations correctly:
>PDFFiles will be opened by FoxitReader
>PlainTextFiles will be opened by PFE.

So the reported issue has been fixed by T.C. 7.50 PB3. :)

+ Total Commander 7.50 PB3
+ Windows XP Prof SP1, 32bit, ger

Kind regards,
Karl
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Great, thanks! Indeed when "wrong_search" was missing, the operations were shifted by one filter in beta 2 and earlier.
Author of Total Commander
https://www.ghisler.com
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

Fix confirmed.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks for confirming it too!
Author of Total Commander
https://www.ghisler.com
Post Reply