Question about wild-pathnames
Robert Goldman <[email protected]> Wed, 05 Jul 2023 18:26:16 -0500
| Newsgroups | gmane.editors.j.devel |
|---|---|
| Message-ID | <[email protected]> |
--=_MailMate_0387E4CF-58E1-47EA-BC22-3BE3D56B5B26_=
Content-Type: text/plain; format=flowed; markup=markdown
In SBCL and Allegro, it's possible for UIOP to create a pathname for a
file whose name is "*" and then we can find a file with such a(n odd)
pathname.
On ABCL, though, this gives me an error:
(truename (ensure-pathname "*"))
```
(truename (uiop:ensure-pathname "*"))
#<THREAD "interpreter" native {21C91F12}>: Debugger invoked on condition
of type FILE-ERROR
Cannot find the TRUENAME for a wild pathname.
```
But actually, I don't think this *is* a wild pathname:
```
CL-USER(4): (describe (uiop:ensure-pathname "*"))
#P"*" is an object of type PATHNAME:
HOST NIL
DEVICE NIL
DIRECTORY NIL
NAME "*"
TYPE :UNSPECIFIC
VERSION NIL
```
*this* is a wild pathname:
```
CL-USER(5): (describe (parse-namestring "*"))
#P"*" is an object of type PATHNAME:
HOST NIL
DEVICE NIL
DIRECTORY NIL
NAME :WILD
TYPE NIL
VERSION NIL
```
Is this an ABCL bug, since it means ABCL cannot address a file whose
name is "*"?
The interested may refer to [this ASDF
issue](https://gitlab.common-lisp.net/asdf/asdf/-/issues/140) and the
corresponding merge request.
Thanks!
--=_MailMate_0387E4CF-58E1-47EA-BC22-3BE3D56B5B26_=
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE html>
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/xhtml; charset=3Dutf-8"=
>
</head>
<body><div style=3D"font-family: sans-serif;"><div class=3D"markdown" sty=
le=3D"white-space: normal;">
<p dir=3D"auto">In SBCL and Allegro, it's possible for UIOP to create a p=
athname for a file whose name is "*" and then we can find a fil=
e with such a(n odd) pathname.</p>
<p dir=3D"auto">On ABCL, though, this gives me an error:</p>
<pre style=3D"margin-left: 15px; margin-right: 15px; padding: 5px; backgr=
ound-color: #F7F7F7; border-radius: 5px 5px 5px 5px; overflow-x: auto; ma=
x-width: 90vw;"><code style=3D"margin: 0 0; border-radius: 3px; backgroun=
d-color: #F7F7F7; padding: 0px;">(truename (ensure-pathname "*"=
))
</code></pre>
<pre style=3D"margin-left: 15px; margin-right: 15px; padding: 5px; backgr=
ound-color: #F7F7F7; border-radius: 5px 5px 5px 5px; overflow-x: auto; ma=
x-width: 90vw;"><code style=3D"margin: 0 0; border-radius: 3px; backgroun=
d-color: #F7F7F7; padding: 0px;">(truename (uiop:ensure-pathname "*&=
quot;))
#<THREAD "interpreter" native {21C91F12}>: Debugger invok=
ed on condition of type FILE-ERROR
Cannot find the TRUENAME for a wild pathname.
</code></pre>
<p dir=3D"auto">But actually, I don't think this <em>is</em> a wild pathn=
ame:</p>
<pre style=3D"margin-left: 15px; margin-right: 15px; padding: 5px; backgr=
ound-color: #F7F7F7; border-radius: 5px 5px 5px 5px; overflow-x: auto; ma=
x-width: 90vw;"><code style=3D"margin: 0 0; border-radius: 3px; backgroun=
d-color: #F7F7F7; padding: 0px;">CL-USER(4): (describe (uiop:ensure-pathn=
ame "*"))
#P"*" is an object of type PATHNAME:
HOST NIL
DEVICE NIL
DIRECTORY NIL
NAME "*"
TYPE :UNSPECIFIC
VERSION NIL
</code></pre>
<p dir=3D"auto"><em>this</em> is a wild pathname:</p>
<pre style=3D"margin-left: 15px; margin-right: 15px; padding: 5px; backgr=
ound-color: #F7F7F7; border-radius: 5px 5px 5px 5px; overflow-x: auto; ma=
x-width: 90vw;"><code style=3D"margin: 0 0; border-radius: 3px; backgroun=
d-color: #F7F7F7; padding: 0px;">CL-USER(5): (describe (parse-namestring =
"*"))
#P"*" is an object of type PATHNAME:
HOST NIL
DEVICE NIL
DIRECTORY NIL
NAME :WILD
TYPE NIL
VERSION NIL
</code></pre>
<p dir=3D"auto">Is this an ABCL bug, since it means ABCL cannot address a=
file whose name is "*"?</p>
<p dir=3D"auto">The interested may refer to <a href=3D"https://gitlab.com=
mon-lisp.net/asdf/asdf/-/issues/140" style=3D"color: #3983C4;">this ASDF =
issue</a> and the corresponding merge request.</p>
<p dir=3D"auto">Thanks!</p>
</div>
</div>
</body>
</html>
--=_MailMate_0387E4CF-58E1-47EA-BC22-3BE3D56B5B26_=--