Issue when launching PsPad editor with relative program path

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
X-Byte
Member
Member
Posts: 173
Joined: 2004-11-29, 09:34 UTC
Location: Hessen, Germany

Issue when launching PsPad editor with relative program path

Post by *X-Byte »

I've been trying to make sense of some behavior which has been bugging me for a long time now and spent a few hours examining it.

I'm using Total Commander in a portable setup, which means I make heavy use of relative path addressing within Total Commander with %COMMANDER_PATH% being the starting point to include plugins, inis, viewers and the custom editor, which in my case is PsPad. It all works like a charm, EXCEPT when it comes to launching files for editing in PsPad with F4.

While the first file opens fine in a newly launched PsPad, all following files which I want to edit with F4 open in the already launched PsPad with PsPad.exe for binary editing in a tab and in an additional tab the file which I actually want to edit.

I've experimented with quotes around the editor program and for the filename parameter in multiple ways.
I've tried different paths for TC and PsPad, still maintaining the relative path for the editor call.

It seems to me as soon as there's a relative path portion, like "." (current directory) or ".." (parent directory) within the editor program path, this odd PsPad behavior occurs. But it only occurs with PsPad, it doesn't happen with Notepad++ which I also tried during my research efforts.

To make things worse, this behavior is not persistent even with the same configuration. Switching back and forth between different editor path addressing methods in TC, it sometimes works without a problem with ".."s in the path.

Maybe at least one or some of you can confirm this in their own environment. Or maybe I'm the only one... or I'm nuts.

Here's what I tried:
Fresh portable installation of Total Commander 9.51 (64+32) in C:\test\TC
Freshly unpacked PsPad 5.0.3 in C:\test\PsPad

- Launch TC 64bit
- Configure Editor to: C:\test\PsPad\PsPad.exe "%1"
- Press F4 on a text file
- PsPad starts and opens the text file
- Back in TC, press F4 again on another text file
- PsPad opens the other text file in a new tab
-> All fine

Now let's try that with just a tiny bit of relative path addressing for the editor. make sure you close TC and PsPad before you start over.
- Launch TC 64bit
- Configure Editor to: C:\test\TC\..\PsPad\PsPad.exe "%1"
- Press F4 on a text file
- PsPad starts and opens the text file
- Back in TC, press F4 again on another text file
- PsPad opens its own binary PsPad.exe in a new tab and in addition the other text file in another tab
-> NOT fine
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Issue when launching PsPad editor with relative program path

Post by *Dalai »

I tried it, and I can confirm it. It's a PsPad issue. Open a CMD and run these commands:

Code: Select all

C:\test\PsPad\PsPad.exe C:\some\file.txt
C:\test\PsPad\Colors\..\PsPad.exe c:\some\other\file.txt
The same issue will occur. PsPad's command line parsing routine seems to get confused by such paths, at least when the single instance option is enabled (I wasn't able to disable it, so I couldn't test it with multiple instances).

My guess is that it compares its own path (C:\test\PsPad\PsPad.exe) to the path of the newly launched instance (C:\test\PsPad\Colors\..\PsPad.exe) - which obviously fails in such a case. But that's just a shot in the dark, and up to the developer to find out and solve ;).

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
nsp
Power Member
Power Member
Posts: 1803
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: Issue when launching PsPad editor with relative program path

Post by *nsp »

I've made a test with pspad 32bit 5.04 (385) using a button TC 9.51 32/64 bit

Code: Select all

command: %COMMANDER_PATH%\..\pspad\PSpad.exe
parameter:%P%S
First time you launch pspad all is OK, next time you launch pspad you have this weird behaviour.
It is also the same from a cmd console.

Code: Select all

:From pspad folder
..\pspad\pspad.exe PSPad.url
..\pspad\pspad.exe Licence.txt
This is a Pspad issue !
You can report bug in pspad forum.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6449
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Issue when launching PsPad editor with relative program path

Post by *Horst.Epp »

Why don't you use the %COMMANDER_DRIVE% as start ?
No need for any .. contructs
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
PSpad
New Member
New Member
Posts: 1
Joined: 2021-01-25, 20:21 UTC

Re: Issue when launching PsPad editor with relative program path

Post by *PSpad »

Hello

I got information about this problem on Jan. 10th. from one my user.
This problem was solved and fixed version will be available in the next build of PSPad editor 5.0.5 in PSPad developer forum

Next time please write me to support mail.

Jan Fiala
User avatar
X-Byte
Member
Member
Posts: 173
Joined: 2004-11-29, 09:34 UTC
Location: Hessen, Germany

Re: Issue when launching PsPad editor with relative program path

Post by *X-Byte »

Thank you Jan, I was about to announce the fix here as well but you were quicker ;)
Post Reply