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

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

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

Post by FluxTorpedoe »

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.

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

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

Post by bdeshi »

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.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

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

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

Post by FluxTorpedoe »

SammaySarkar wrote: 19 Apr 2019 17:35My 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: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

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

Post by admin »

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

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

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

Post by FluxTorpedoe »

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