[Solved] SC exists() not <xypath> relative anymore

Things you’d like to miss in the future...
Post Reply
FluxTorpedoe
Posts: 728
Joined: 05 Oct 2011 13:15

[Solved] SC exists() not <xypath> relative anymore

Post by FluxTorpedoe » 19 Apr 2019 10:56

Hi,

It seems exists() was updated a few months ago, and its (theory of) relativity was broken… ;)

So even this example from the manual doesn’t work anymore (outputs 0):
echo exists("XYplorer.exe");

I probably missed discussions about this, but I guess it’s not intended.

Have a nice day,

    Flux
Last edited by FluxTorpedoe on 05 May 2019 17:43, edited 1 time in total.

SammaySarkar
Posts: 4205
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: SC exists() not <xypath> relative anymore

Post by SammaySarkar » 19 Apr 2019 17:35

It was done as part of a drive to bring consistency in path parsing of various scripting commands. Here's the discussion: viewtopic.php?f=5&t=19998
My view is that the current path should be taken as base path in scripts; the software being a file manager, the current location should always be the default scope of all operations.

FluxTorpedoe
Posts: 728
Joined: 05 Oct 2011 13:15

Re: SC exists() not <xypath> relative anymore

Post by FluxTorpedoe » 20 Apr 2019 18:28

SammaySarkar wrote:
19 Apr 2019 17:35
My view is that the current path should be taken as base path in scripts
Well, that seems sound and logical! I’d definitely second that.
Besides, for scripts where the old behavior is needed, it’s not much work to prefix relative paths with <xypath>.

So I guess my post doesn’t really belong in the "Bug Reports" section anymore (it’s more about updating the manual).

Thanks for the info. 8)

admin
Site Admin
Posts: 47422
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: SC exists() not <xypath> relative anymore

Post by admin » 02 May 2019 17:20

I'll update the Help... :ninja:

FluxTorpedoe
Posts: 728
Joined: 05 Oct 2011 13:15

Re: SC exists() not <xypath> relative anymore

Post by FluxTorpedoe » 05 May 2019 17:46

Hi’

Since everyone is on the same page —and it’s neither a bug nor a regression per se—, I marked the thread as [Solved].

Have a nice day,   :)

    Flux

Post Reply