Weird behavior when editing icon for button bar entries

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
kapela86
Junior Member
Junior Member
Posts: 22
Joined: 2013-08-12, 21:28 UTC
Location: Poland

Weird behavior when editing icon for button bar entries

Post by *kapela86 »

I'm trying to use "%COMMANDER_PATH%\..\something" in "Icon file" location and it just keep changing to normal path.

Here's my example, Total Commander located in "D:\Programy\Total Commander" and UltraSearch in "D:\Programy\UltraSearch\UltraSearch.exe"

1. In main TC windows, Click "Configuration" -> "Button Bar..."
2. "Change >>" -> "Insert file name..." and select UltraSearch.exe
3. In "Command" i put "%COMMANDER_PATH%\..\UltraSearch\UltraSearch.exe" (with quotation marks)
4. In "Icon file" i put the same thing, and when I click OK I see that it changes to normal path

And here's something weird, when I right click that buttonbar icon and select "Change", I can put "%COMMANDER_PATH%\..\UltraSearch\UltraSearch.exe" and it stays that way (it's saved to disk like that). And if I then edit Button Bar, it's changed to normal path.
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3862
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

Confirmed for Windows 7 (64-bit), TC 8.01 (64-bit)

Works fine for TC 8.01 (32-bit) though.
#5767 Personal license
kapela86
Junior Member
Junior Member
Posts: 22
Joined: 2013-08-12, 21:28 UTC
Location: Poland

Post by *kapela86 »

on both 32 & 64bit is the same problem, but now I know what is causing it. It's quotation marks.

Code: Select all

"%COMMANDER_PATH%\..\UltraSearch\UltraSearch.exe"
"..\UltraSearch\UltraSearch.exe"
"D:\Programy\UltraSearch\UltraSearch.exe"
are changed to

Code: Select all

D:\Programy\UltraSearch\UltraSearch.exe
but

Code: Select all

%COMMANDER_PATH%\..\UltraSearch\UltraSearch.exe
..\UltraSearch\UltraSearch.exe
are not changed
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It looks like TC is resolving the env vars in order to actually load the icon. I will check whether I can avoid that.
Author of Total Commander
https://www.ghisler.com
Post Reply