Hi,
is there a tweak I've missed?
Why does <selitem> returns the tailing "\" for drives (the root folder) but not for child folders? It's the same with Files > To Clipboard > Item Path/Names.
The behavior should be the same, shouldn't it?
<selitem> and "\"
-
Filehero
- Posts: 2734
- Joined: 27 Feb 2012 18:50
- Location: Windows 11@100%
-
jupe
- Posts: 3477
- Joined: 20 Oct 2017 21:14
- Location: Win10 22H2 120dpi
Re: <selitem> and "\"
I think this could possibly be because of:
screenshot taken of the XYplorer help file.
screenshot taken of the XYplorer help file.
To see the attached files, you need to log into the forum.
-
Filehero
- Posts: 2734
- Joined: 27 Feb 2012 18:50
- Location: Windows 11@100%
Re: <selitem> and "\"
Hi Jupe,
thanks for the possible explanation. Another legacy Windows awkwardness, it seems.
thanks for the possible explanation. Another legacy Windows awkwardness, it seems.
-
admin
- Site Admin
- Posts: 66719
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: <selitem> and "\"
OK, but shouldn't XYplorer variables return something that has some consistency? I think all paths should be returned unslashed.Filehero wrote:Hi Jupe,
thanks for the possible explanation. Another legacy Windows awkwardness, it seems.
And, if you are in C: this returns "C:" unslashed:
Code: Select all
echo <curpath>;FAQ | XY News RSS | XY X
-
Filehero
- Posts: 2734
- Joined: 27 Feb 2012 18:50
- Location: Windows 11@100%
Re: <selitem> and "\"
Yes, hence my question.admin wrote: OK, but shouldn't XYplorer variables return something that has some consistency? I think all paths should be returned unslashed.
Unfortunately, yes. Perhaps a tweak?admin wrote: But if I'd change it now, would I break old code? Probably...
-
admin
- Site Admin
- Posts: 66719
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: <selitem> and "\"
Given that usually xy variables and environment variables return paths without a trailing slash, and I know for sure that this is intended and coded in many places in the program, I would classify this as a bug, which means I should just fix it.
Any objections?
Any objections?
FAQ | XY News RSS | XY X
-
highend
- Posts: 15004
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: <selitem> and "\"
But this change will break scripts as well...
And if you really do it, don't forget that some shell context menus do the same:
To Clipboard - Item Path(s) comes to my mind...
And if you really do it, don't forget that some shell context menus do the same:
To Clipboard - Item Path(s) comes to my mind...
One of my scripts helped you out? Please donate via Paypal
-
admin
- Site Admin
- Posts: 66719
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
XYplorer Beta Club