[9.0rc5 x86] Wrong %p%s2 substitution in branch view

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

[9.0rc5 x86] Wrong %p%s2 substitution in branch view

Post by *MVV »

Let's test with test file D:\!!!Downloads\!!!Ready\!!!Games\Valve\Half-Life\config.txt.
Test button is cmd.exe with parameters /c echo %p%s2 & pause.

1. Focus file in its dir and click the button:
D:\!!!DOW~1\!!!Ready\!!!Games\Valve\HALF-L~1\config.txt
2. Go one level up, press Ctrl+B, focus file and click the button:
D:\!!!DOW~1\!!!Ready\!!!Games\Valve\Half-Life\Half-Life\config.txt
3. Go another level up, press Ctrl+B, focus file and click the button:
D:\!!!DOW~1\!!!Ready\!!!Games\Valve\Half-Life\Valve\Half-Life\config.txt
4. Etc...
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3854
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

Confirmed!
Interesting thing, fails with %p%s2, but works fine with %P%s2

BTW: same for TC 8.52a
#5767 Personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately there is no easy solution: Currently %p is the full 8.3 path of the file under the cursor, and %n is just the 8.3 DOS name without any path part.

In your second example, %p would be
D:\!!!DOW~1\!!!Ready\!!!Games\Valve\Half-Life\
and %n would be
config.txt

If I changed %p now to match %s, I would have to change the behaviour of %n too. I'm sure that this would break a lot of TC installations. :(
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

You can at least fix mentioned case when %p is used together with %s, it will not break anything working.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Sorry for late report, works fine in TC 9.0RC1 and in current TC 9.0RC3, thank you!
Post Reply