Nasty Pathing bug - Programs launched from Button Bar

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

mhaecki
Junior Member
Junior Member
Posts: 17
Joined: 2008-08-06, 22:11 UTC

Also parameter %P has the same topic

Post by *mhaecki »

One day i had troubles with a path in an older version of TC while launching WinDirStat. I could resolve it by placeing double quotes around the parameter %P.

Since 7.56a (or may be earlier because of long time no use) this is not working proper.

Means:

Code: Select all

button29=C:\Program Files\WinDirStat\windirstat.exe
cmd29=C:\Program Files\WinDirStat\windirstat.exe
param29=""%P""
(Still) using Windows XP

--- "%P"
- Starting a search from "C:" then it searches "C:\Program Files\WinDirStat\" --> Not Ok
- Starting a search from "C:\Program Files" then it searches from "C:\Program Files" --> Ok

--- %P
- Starting a search from "C:" then it searches "C:\" --> Ok
- Starting a search from "C:\Program Files" then it searches from "C:\Program" --> Not Ok

So, with quotes is not good, without quotes is not good?

Possible trouble points:
- different interpretation of the ".bar" datas since it worked
- different way to give %P to the programm
- Has an text interpretation lib changed?

Possible solution (more a patch but could work):
- Add a parameter which gives the path in double quotes when space or other special chars detected and no double quotes otherwise.
- It could also give the dos path.
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

I can confirm, my original Bug Report, only happens with %P%S and %S

When I remove the button's parameters, the proper app is launched.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The problem reproduced and reported by me is unrelated to Balderstrom's report. (%S parameter)
In my case javacpl.exe itself causes the failure, not Total Commander.
Ah, thanks for the clarification! Yes, this makes perfect sense - in the %S case, it's TC's fault using CreateProcess with the path not surrounded by double quotes. In the havacpl case, it's javacpl's fault not to surround the path to the program it launches in double quotes.

Unfortunately I can only fix the first, not the second problem. But maybe you can launch the java program by changing the path from "program files" to progra~1 or whatever the short DOS dir name is...
Author of Total Commander
https://www.ghisler.com
User avatar
karlchen
Power Member
Power Member
Posts: 4603
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hello, Christian.

By default, there is no executable file C:\Program.exe on any of the systems which I use regularly or rarely. This file was created because it was one of the pre-requisites to reproduce the problem reported by Balderstrom.

So the javacpl problem will never occur in everyday life.

Kind regards,
Karl
Post Reply