Comma and Icon file for button !

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Vansumsen
Power Member
Power Member
Posts: 761
Joined: 2003-11-09, 08:16 UTC
Location: Belgique
Contact:

Comma and Icon file for button !

Post by *Vansumsen »

Not really a bug but always annoying !

I just found a strange behaviour of TC when I choose an icon file for my «Button bar» !

If the path for the icon file contains a comma followed by a number, the path is truncated just before the comma and the icon is not displayed !
i.e. :
"c:\Program Files\Spybot - Search & Destroy_1,5\SpybotSD.exe" is truncated "c:\Program Files\Spybot - Search & Destroy_1"
"c:\Totalcmd\Icones\Virgule_15\2COEURS,3Transparents.ico" is truncated "c:\Totalcmd\Icones\Virgule_15\2COEURS"

but

"c:\Program Files\Spybot - Search & Destroy_1,A\SpybotSD.exe"
"c:\Totalcmd\Icônes\Virgule_15\2COEURS,Transparents.ico"

are working perfectly

The same comma onto the command line of the button works also perfectly, the button calls the right program !
i.e - Command: "c:\Program Files\Spybot - Search & Destroy_1,5\SpybotSD.exe"


How to reproduce easily :
1° Rename an icon file adding «,2» anywhere in its name (or path).
2° Change the icon for one of your button with this newly named icon file.

Why ?
Looking at the .bar file the name or the path was correct but it permitted me to find out the reason !
The comma followed by a number is interpreted as separator for the range number of the icon like in «button6=wcmicons.dll,4»
Adding quotes is useless... :(

Workaround :
1° Avoid to use comma for dir or files names !
2° Eventualy extract the wanted icon and¦or move¦rename it elsewhere but without comma !!!
3° Use a fake comma like #184 : ¸

Friendly

Paul
Ouistiti, #11943

L'important n'est pas de convaincre, mais de donner à réfléchir.
The important thing is not to convince, but to incite to think.

1,77245385090552...
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3378
Joined: 2003-05-06, 11:46 UTC

Post by *Sir_SiLvA »

Id call that a bug that could be prevent by TC to ignore Commatas in Quotes.
so "icondll.dll",5 its gonna be and not "icondll.dll,5"
Hoecker sie sind raus!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately it's common to have something like "icondll.dll,5" in the registry. TC uses the first comma to find the icon number.

So in your case, try changing the path to something like
"c:\Program Files\Spybot - Search & Destroy_1,5\SpybotSD.exe,-1"
Author of Total Commander
https://www.ghisler.com
User avatar
Vansumsen
Power Member
Power Member
Posts: 761
Joined: 2003-11-09, 08:16 UTC
Location: Belgique
Contact:

Post by *Vansumsen »

:arrow: Ghisler

Thanks for the trick (,-1) but it works only for icons embedded into an *.exe file... not for a standalone *.ico file !

Friendly

Paul
Ouistiti, #11943

L'important n'est pas de convaincre, mais de donner à réfléchir.
The important thing is not to convince, but to incite to think.

1,77245385090552...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Appending ,0 will work for .ico files. Unfortunately it will be deleted each time you reconfigure that button, so you will have to re-add it.
Author of Total Commander
https://www.ghisler.com
Post Reply