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

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

:info: Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
Post Reply
FluxTorpedoe
Posts: 906
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: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
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: 906
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: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

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

Post by admin »

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

FluxTorpedoe
Posts: 906
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