External viewers relative path is broken!

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
thims
Junior Member
Junior Member
Posts: 30
Joined: 2010-11-22, 16:27 UTC
Location: Kaliningrad, Russia

External viewers relative path is broken!

Post by *thims »

Previously (including TC 8.52a) I used relative paths for externals viewers (Configuration -> Operation -> Edit/View). In both "Default" and "Associations". I used the relative path in "Editor" field as well.

My paths look like this:
Hiew\view32.exe "%1"
IrfanView\i_view32.exe
or
Notepad++\notepad++.exe

I have "Hiew", "IfranView" and "Notepad++" as subfolders of TC's installation folder.

In the latest 9.0.RC2 only external editor works. None of viewers is working reporting "File not Found!" error.
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3893
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

Better use variables like this:
%COMMANDER_PATH%\Hiew\view32.exe "%1"
%COMMANDER_PATH%\IrfanView\i_view32.exe
or
%COMMANDER_PATH%\Notepad++\notepad++.exe
#5767 Personal license
User avatar
thims
Junior Member
Junior Member
Posts: 30
Joined: 2010-11-22, 16:27 UTC
Location: Kaliningrad, Russia

Post by *thims »

I know that I can use variables. But it has to work without it. Now it works for editor but doesn't work for viewers. This is a regression.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50550
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This has never been supported officially, it was just a coincidence if it worked. It's not clear relative to what these paths would be - to the viewed files? To TC? To Windows directory?
Author of Total Commander
https://www.ghisler.com
User avatar
Dalai
Power Member
Power Member
Posts: 9970
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

2thims
Where's the difference between relative paths and env variables, when you already assume that the former are relative to TC's directory? I don't see any, and that's why I don't see any problem to use env variables.

BTW: Relative paths are ALWAYS a bad idea since you don't always know what they're relative to. It's always better to assemble the full path using some kind of variables.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
thims
Junior Member
Junior Member
Posts: 30
Joined: 2010-11-22, 16:27 UTC
Location: Kaliningrad, Russia

Post by *thims »

ghisler(Author) wrote:It's not clear relative to what these paths would be - to the viewed files? To TC? To Windows directory?
At least relative paths have to behave the same way. For example, relative to TC (or any other dir of your choice, but the same way everywhere).
Post Reply