Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Why does @WSLPATH double the leading '/'?

May
12,845
164
Code:
v:\> echo %@wslpath[infile]
//mnt/v/infile

Doubling the leading '/' doesn't hurt. Does it ever help?
 
/mnt/v/infile could be a valid Windows pathname. //mnt/v/infile isn't.
I don't see a difference in TCC. DIR and TYPE don't mind the extra leading slash.

Code:
v:\> dir "//mnt/v"

 Volume in drive V is DATA         Serial number is 6e8a:6d1f
 Directory of  V:\mnt\v\*

2019-10-22  12:15         <DIR>    .
2019-10-22  12:15         <DIR>    ..
2019-10-22  12:16               9  infile
                   9 bytes in 1 file and 2 dirs    4,096 bytes allocated
     506,830,897,152 bytes free

v:\> type "//mnt/v/infile"
3
2
1
 

Similar threads

Back
Top