[TC 11.50b8] ->.ico not working when filepath contains quotes

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

Moderators: Hacker, petermad, Stefan2, white

User avatar
Stiltzkin
Member
Member
Posts: 194
Joined: 2004-09-10, 17:15 UTC

[TC 11.50b8] ->.ico not working when filepath contains quotes

Post by *Stiltzkin »

does not work:

Code: Select all

"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"
"%PROGRAMFILES(x86)%\Microsoft\Edge\Application\msedge.exe"
works:

Code: Select all

%PROGRAMFILES(x86)%\Microsoft\Edge\Application\msedge.exe
C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.50b8] ->.ico not working when filepath contains quotes

Post by *ghisler(Author) »

Where is that defined? In the button bar?
Author of Total Commander
https://www.ghisler.com
User avatar
Stiltzkin
Member
Member
Posts: 194
Joined: 2004-09-10, 17:15 UTC

Re: [TC 11.50b8] ->.ico not working when filepath contains quotes

Post by *Stiltzkin »

in the "icon file:" textfield.

for example:

Code: Select all

TOTALCMD#BAR#DATA
msedge.exe
--enable-natural-scroll-default
"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"
Edge
"C:\Program Files (x86)\Microsoft\Edge\Application\"
-1
-1
User avatar
petermad
Power Member
Power Member
Posts: 15997
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.50b8] ->.ico not working when filepath contains quotes

Post by *petermad »

It only works if the quotes in the "Icon file" field is removed:

Code: Select all

TOTALCMD#BAR#DATA
msedge.exe
--enable-natural-scroll-default
C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe
Edge
"C:\Program Files (x86)\Microsoft\Edge\Application\"
-1
-1
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
AntonyD
Power Member
Power Member
Posts: 1554
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: [TC 11.50b8] ->.ico not working when filepath contains quotes

Post by *AntonyD »

So the question is - WHY we can't use here the quotes - exactly ins that case - when they are deeply needed (((

And + btw - how to point out the 3 icon for example "buried" in this exe? In this case...
I thought that this should be like that: "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe,3"
but obviously that this will not work, so HOW to do that?
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.50b8] ->.ico not working when filepath contains quotes

Post by *ghisler(Author) »

I don't understand, I tried using
"%PROGRAMFILES(x86)%\Microsoft\Edge\Application\msedge.exe"
with the double quotes in the "Icon file" field in the button bar, and the icons show up just fine.
What am I missing? I'm on Windoiws 11.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5744
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.50b8] ->.ico not working when filepath contains quotes

Post by *white »

ghisler(Author) wrote: 2024-12-02, 10:20 UTC What am I missing? I'm on Windoiws 11.
It's about the "->.ico" button as mentioned in the thread's subject.
User avatar
Gral
Power Member
Power Member
Posts: 1600
Joined: 2005-01-26, 15:12 UTC

Re: [TC 11.50b8] ->.ico not working when filepath contains quotes

Post by *Gral »

In other words: press "-> .ico" button - "Save as" window does not show up when path on "Icon file" field contains quotes.
User avatar
white
Power Member
Power Member
Posts: 5744
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.50b8] ->.ico not working when filepath contains quotes

Post by *white »

BTW, in the given example, the specified Start path is "C:\Program Files (x86)\Microsoft\Edge\Application\" (including the quotes).
Quotes are not supported in the Start path. On my Windows 11 system, a start path enclosed within quotes always results in c:\ being used as start path.
And when you right-click the button, the entry "cd ..." is displayed without leading quote, but with trailing quote.
User avatar
Stiltzkin
Member
Member
Posts: 194
Joined: 2004-09-10, 17:15 UTC

Re: [TC 11.50b8] ->.ico not working when filepath contains quotes

Post by *Stiltzkin »

Gral wrote: 2024-12-02, 11:42 UTC In other words: press "-> .ico" button - "Save as" window does not show up when path on "Icon file" field contains quotes.
yes, correct. the icon displays just fine in the buttonbar. it's just that the "->.ico"-button doesn't show the save as dialog.
it works without the quotes around the path.

windows 10, 22H2 x64
User avatar
Stiltzkin
Member
Member
Posts: 194
Joined: 2004-09-10, 17:15 UTC

Re: [TC 11.50b8] ->.ico not working when filepath contains quotes

Post by *Stiltzkin »

white wrote: 2024-12-02, 11:51 UTC And when you right-click the button, the entry "cd ..." is displayed without leading quote, but with trailing quote.
same on win10. it ends with
Application\"
but if you click the entry the directory change is correct.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.50b8] ->.ico not working when filepath contains quotes

Post by *ghisler(Author) »

It's about the "->.ico" button as mentioned in the thread's subject.
Ah, sorry, I didn't make that connection. Confirmed.
Quotes are not supported in the Start path.
Looks like ShellExecuteEx doesn't like quotes in the start path. I will not change this, it may break other people's configuration.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 15997
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.50b8] ->.ico not working when filepath contains quotes

Post by *petermad »

2ghisler(Author)
I will not change this, it may break other people's configuration.
But maybe you could make the -> .ico function disregard any quotes, that would not break backwards compatibility.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.50b8] ->.ico not working when filepath contains quotes

Post by *ghisler(Author) »

But maybe you could make the -> .ico function disregard any quotes
Yes, I have already confirmed that above. What I won't change is the handling of the path field.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 15997
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.50b8] ->.ico not working when filepath contains quotes

Post by *petermad »

history.txt wrote:02.12.24 Fixed: Configure button bar/single button or configure internal command: New button "->.ico" didn't work when the icon name was surrounded by double quotes (32/64)
Confirmed fixed in TC 11.50rc1 :-)
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply